guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixing non-reproducibility in some guile packages


From: Ludovic Courtès
Subject: Re: Fixing non-reproducibility in some guile packages
Date: Mon, 13 Feb 2017 15:40:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hi Chris,

Sorry for the late reply!

Christopher Allan Webber <address@hidden> 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’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]