Hi Chris, Sorry for the late reply!
Christopher Allan Webber <[email protected]> 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? Thanks, Ludo’.
