Ludovic Courtès writes: > Christopher Allan Webber skribis: > >> (let* ((out (assoc-ref %outputs "out")) >> - (module-dir (string-append out "/share/guile/site/2.0")) >> + (module-dir (string-append out "/share/guile/site/" >> + ,(if guile-2.2? >> + "2.2" "2.0"))) >> (source (assoc-ref %build-inputs "source")) > > Another approach, which is more future-proof but also more verbose, is > to evaluate (effective-version) for the Guile that’s being used, on the > “build side” (thus, no need to do the unquote thing above). > > The ‘guile-minikanren’ package does exactly that: > > (let* ((out (assoc-ref %outputs "out")) > (guile (assoc-ref %build-inputs "guile")) > (effective (read-line > (open-pipe* OPEN_READ > (string-append guile "/bin/guile") > "-c" "(display (effective-version))"))) > (module-dir (string-append out "/share/guile/site/" > effective)) …) > …) > > We should probably factorize this somewhere (a new (guix build guile) > module?), but for now that’s what we have. > > How does that sound? It looks much better! I've updated my patch to use this method. Re: the new module, I agree it's a good idea. We had some talks at FOSDEM about maybe supporting more declarative guild'y type configuration again, and maybe that's the right approach, I don't really know. It feels like "what should we do about easy to package guile packages that don't necessarily use autotools" is still a conversation to be had. Not sure if that's a prerequisite for the module. Anyway, okay to push? I'd love to have the buggy package not be buggy in master. :)