unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Christopher Allan Webber <cwebber@dustycloud.org>
Cc: guix-devel@gnu.org
Subject: Re: Fixing non-reproducibility in some guile packages
Date: Mon, 13 Feb 2017 15:40:05 +0100	[thread overview]
Message-ID: <87fujicfy2.fsf@gnu.org> (raw)
In-Reply-To: <87efz35ncm.fsf@dustycloud.org> (Christopher Allan Webber's message of "Sun, 12 Feb 2017 11:29:45 -0600")

Hi Chris,

Sorry for the late reply!

Christopher Allan Webber <cwebber@dustycloud.org> 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’.

  parent reply	other threads:[~2017-02-13 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11  1:29 guile2.2-gdbm-ffi issue Christopher Allan Webber
2017-02-11 17:08 ` Fixing non-reproducibility in some guile packages (was: guile2.2-gdbm-ffi issue) Christopher Allan Webber
2017-02-11 21:20   ` Fixing non-reproducibility in some guile packages Jan Nieuwenhuizen
2017-02-12 17:29     ` Christopher Allan Webber
2017-02-13  6:18       ` Maxim Cournoyer
2017-02-13  7:13         ` Andy Wingo
2017-02-13 16:25           ` Christopher Allan Webber
2017-02-13 17:39           ` Maxim Cournoyer
2017-02-13 14:40       ` Ludovic Courtès [this message]
2017-02-13 16:42         ` Christopher Allan Webber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fujicfy2.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=cwebber@dustycloud.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).