Ludovic Courtès <ludo@HIDDEN>
to control <at> debbugs.gnu.org.
Full text available.
Received: (at submit) by debbugs.gnu.org; 28 Apr 2021 16:19:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 28 12:19:49 2021
Received: from localhost ([127.0.0.1]:53893 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1lbmuj-0001wx-Gr
for submit <at> debbugs.gnu.org; Wed, 28 Apr 2021 12:19:49 -0400
Received: from lists.gnu.org ([209.51.188.17]:33384)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <rekado@HIDDEN>) id 1lbmuh-0001wp-D8
for submit <at> debbugs.gnu.org; Wed, 28 Apr 2021 12:19:47 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48954)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <rekado@HIDDEN>)
id 1lbmuh-0002KE-0H
for bug-guix@HIDDEN; Wed, 28 Apr 2021 12:19:47 -0400
Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21196)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from <rekado@HIDDEN>)
id 1lbmue-0000Aw-RQ
for bug-guix@HIDDEN; Wed, 28 Apr 2021 12:19:46 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1619626777; cv=none;
d=zohomail.com; s=zohoarc;
b=gXZPAkDe8LyEqLdZsLWbtorD8C3ncY3uJQD+wmW/7EEZnG9h6mpYsR/D/X+G4T9a092X1QCBhtFMpNBr1wWQGHnWNkZQYqWL8l0VFWALDyzMpwE7zxvdeOkntkpiguNprsL8qpFW/BsQZob3lS23xvGQTMF6ss8cOKq1yNOC5E4=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
s=zohoarc; t=1619626777;
h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To;
bh=t+MCmA/0UXsRoff4pFGkvWRM9IBIKIux7anRca3bjuo=;
b=iVg9HQIm6SZQPUGymnJifigibdZIfz2yP8300zYAFd4zUsueL1H59gKelbhC/qLMuzr8B0KRnGprLJgf4bqnk73ZsL83sW5mccAYM5qfsS+kfV/cs5HsS6Acb141uaMT037Z/nJ2NCKutViaJRarcTiFgjV4c/nZDb1O3o4ToEA=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass header.i=elephly.net;
spf=pass smtp.mailfrom=rekado@HIDDEN;
dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1619626777;
s=zoho; d=elephly.net; i=rekado@HIDDEN;
h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
bh=t+MCmA/0UXsRoff4pFGkvWRM9IBIKIux7anRca3bjuo=;
b=dBYgFvMKUiyXS1Ciivj0/FCana/9OVSI9fF8TMPMcMHZiiE66HAuqQFfHHsQCu5Y
MRcVT+z0gesNeOGaJEwolafiR8WIBuKqpwBwUSThwMnZvyX2bxW0RktjGaaCJmwSpPr
ObgQHBbR0mFW4+F4/U629mgQ37gqMALbqoUoDTcI=
Received: from localhost (p54ad4f2c.dip0.t-ipconnect.de [84.173.79.44]) by
mx.zohomail.com with SMTPS id 1619626774569708.136225474451;
Wed, 28 Apr 2021 09:19:34 -0700 (PDT)
User-agent: mu4e 1.4.15; emacs 27.2
From: Ricardo Wurmus <rekado@HIDDEN>
To: bug-guix@HIDDEN
Subject: =?utf-8?Q?=E2=80=9Cguix?= environment =?utf-8?Q?-l=E2=80=9D?= does
not work with inferior packages
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
Date: Wed, 28 Apr 2021 18:19:31 +0200
Message-ID: <878s52nzzg.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
Received-SPF: pass client-ip=136.143.188.51; envelope-from=rekado@HIDDEN;
helo=sender4-of-o51.zoho.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)
I wanted to use an environment file that contains a package=20
definition, and use it with inferiors. Here is the full guix.scm:
--8<---------------cut here---------------start------------->8---
(use-modules
(guix channels)
(guix inferior)
(guix build-system gnu)
(guix packages)
(guix licenses)
(gnu packages)
(ice-9 match))
(define channels
(list (channel
(name 'guix-bimsb)
(url "https://github.com/BIMSBbioinfo/guix-bimsb.git")
(commit
"be42b099867a29a68a9ffbf304dc7f9137b75fe3"))
(channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(commit
"01e33a031e493477d930b9383d397fea012a3b1a")
(introduction
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
(openpgp-fingerprint
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A=20
54FA"))))))
(define (lookup name)
(specification->package name))
(define (lookup-inferior name)
(define inferior
(inferior-for-channels channels))
(match (lookup-inferior-packages inferior name)
((first . rest) first)
(_ (error
(format #false "Could not find package `~a'.~%" name)))))
(define (p name)
(let* ((how (if (getenv "USE_GUIX_INFERIOR")
lookup-inferior lookup))
(pkg (how name)))
`(,name ,pkg)))
(define %version
(symbol->string (with-input-from-file "VERSION" read)))
(define-public my-package
(package
(name "my-package")
(version %version)
(source
(string-append (getcwd) "/my-package-" version ".tar.gz"))
(build-system gnu-build-system)
(inputs
(map p (list "bwa"
"r-minimal"
"r-rmarkdown"
"python-wrapper"
"python-pyyaml")))
(native-inputs
(map p (list "autoconf"
"automake")))
(home-page "TODO")
(synopsis "TODO")
(description "TODO")
(license gpl3+)))
my-package
--8<---------------cut here---------------end--------------->8---
The idea was that you would use the provided channels with
USE_GUIX_INFERIOR=3Dt guix environment -l guix.scm
Unfortunately, this does not work, but there also is no error. I=20
end up in an environment where none of the declared inputs are=20
available. That=E2=80=99s because (guix scripts environments) has no=20
facilities to deal with packages that are of type=20
<inferior-package>.
--=20
Ricardo
Ricardo Wurmus <rekado@HIDDEN>:bug-guix@HIDDEN.
Full text available.bug-guix@HIDDEN:bug#48082; Package guix.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.