From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: bug#32749: package-with-explicit-inputs leaks-in additional inputs Date: Tue, 18 Sep 2018 17:03:36 +0200 Message-ID: <87in323l13.fsf@gnu.org> References: <87tvmo4f1d.fsf@gnu.org> <87musf6fas.fsf@gnu.org> <87y3bz3033.fsf@gnu.org> <87d0taj2gm.fsf@gnu.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]:59674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2HmE-00015I-Cg for bug-guix@gnu.org; Tue, 18 Sep 2018 11:19:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2HYk-0004vy-Tl for bug-guix@gnu.org; Tue, 18 Sep 2018 11:05:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40332) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2HYk-0004vq-O3 for bug-guix@gnu.org; Tue, 18 Sep 2018 11:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g2HYk-0006HG-2B for bug-guix@gnu.org; Tue, 18 Sep 2018 11:05:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87d0taj2gm.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 18 Sep 2018 16:38:01 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 32749@debbugs.gnu.org Ludovic Court=C3=A8s writes: >> I tried this! The dependencies look OK, but the package won't build -- >> there's no tar, make etc. > > Ah, true! > >> ...but that looks a bit strange: if we have to mention the inputs a >> second time the advantage over using the `gnu-make-no-implicit-inputs' >> package description becomes real small? > > The key thing is that =E2=80=98package-with-explicit-inputs=E2=80=99 work= s recursively: > it adds (it does *not* replace) inputs to the whole package graph. Ah, cool! > Consider this: > > (define x > (let ((p (package-with-explicit-inputs gnu-make > (%bootstrap-inputs+toolchain) > =E2=80=A6))) > =E2=80=A6)) > > Here =E2=80=98%bootstrap-inputs+toolchain=E2=80=99 is called from the top= level, when > =E2=80=98%current-system=E2=80=99 has its default value. So if you=E2=80= =99re on x86_64, you > get the x86_64 inputs. Doh'! The let is at toplevel...yeah that makes sense. > So it=E2=80=99s not a bug per se, but it=E2=80=99s definitely an annoyanc= e. I agree, indeed it's rather a problem of interaction between --system/(%current-system). > I just realized that there=E2=80=99s already a fix for this, which is to = pass > =E2=80=98package-with-explicit-inputs=E2=80=99 a procedure rather than th= e input list, > like this: > > (package-with-explicit-inputs gnu-make > %bootstrap-inputs+toolchain > =E2=80=A6) > > Does it work for you? Yes! I'm reverting my `...leak' commits and create thunks as input of package-with-explicit-inputs. Thanks! janneke