From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Fixing non-reproducibility in some guile packages Date: Mon, 13 Feb 2017 15:40:05 +0100 Message-ID: <87fujicfy2.fsf@gnu.org> References: <87fujly0pu.fsf@dustycloud.org> <87bmu8y7sx.fsf@dustycloud.org> <87tw80pgpl.fsf@gnu.org> <87efz35ncm.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36878) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdHnl-0002GF-Ov for guix-devel@gnu.org; Mon, 13 Feb 2017 09:40:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdHnh-0000Mi-MG for guix-devel@gnu.org; Mon, 13 Feb 2017 09:40:25 -0500 In-Reply-To: <87efz35ncm.fsf@dustycloud.org> (Christopher Allan Webber's message of "Sun, 12 Feb 2017 11:29:45 -0600") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Christopher Allan Webber Cc: guix-devel@gnu.org Hi Chris, Sorry for the late reply! 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=E2=80=99s being used, on= the =E2=80=9Cbuild side=E2=80=9D (thus, no need to do the unquote thing above). The =E2=80=98guile-minikanren=E2=80=99 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)) =E2=80=A6) =E2=80=A6) We should probably factorize this somewhere (a new (guix build guile) module?), but for now that=E2=80=99s what we have. How does that sound? Thanks, Ludo=E2=80=99.