From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sGcYDLh3GmF1LwEAgWs5BA (envelope-from ) for ; Mon, 16 Aug 2021 16:35:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id IIPcB7h3GmEGSQAA1q6Kng (envelope-from ) for ; Mon, 16 Aug 2021 14:35:36 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 17C1A2B1D5 for ; Mon, 16 Aug 2021 16:35:35 +0200 (CEST) Received: from localhost ([::1]:35760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFdi9-0003Rw-7c for larch@yhetil.org; Mon, 16 Aug 2021 10:35:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFdht-0003OG-C0 for help-guix@gnu.org; Mon, 16 Aug 2021 10:35:19 -0400 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFdhn-0004sf-L2 for help-guix@gnu.org; Mon, 16 Aug 2021 10:35:16 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1629124503; cv=none; d=zohomail.com; s=zohoarc; b=AyysOMWrZ8ptcfpPvTbGPZyBrU+ykyyP7GeRYuc2whrxpR86X0ucB23krbk2G+HPGCeLzjRBgLNd6Fgg1EJaS2tfi16w8D4yhLe3MSb5y9JFHRJC3tfLSAP6PB6VW0FhoXVTCVGHJyakPSFDOiuAMmHONGLSfLak/ZSToNseXLY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629124503; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=K4PewGp6AT3uHQwPDfeID8X2cBUu69fGAShGfI1L654=; b=WY7H/sQRbXktqxt6PHa556VOGtEY36EnkY0VagtAQ+vNAxGpx/nFiSbPF08nCDoDzZnkq/ydtMIGo0TBh7y37Cg6aD7iKWPF8igOxgVEiidEeNob8WGvaYuM9ANytQWswjjIRdA4uZoM6GhdDQ6Fg9kEFdKmMPxlh3Q2iySmx0E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1629124503; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=K4PewGp6AT3uHQwPDfeID8X2cBUu69fGAShGfI1L654=; b=GuoKbLWm2abB2WbkzIU4YD2JZ1tpemRP8kUjB5TXeDfeAfW6ouwbmXUEc6m/Ri1W SnEkoH4GA4J1IZpe7ssJ9ByawPXKMVi9GinLFJVkpInIiY+UeWoB6uddGnaDN8Ynxui yqbr+JeKkrIBpsHMhluX6SiLgZsAxjwSLm4FC3IE= Received: from localhost (p54ad4bef.dip0.t-ipconnect.de [84.173.75.239]) by mx.zohomail.com with SMTPS id 1629124499205960.715062442763; Mon, 16 Aug 2021 07:34:59 -0700 (PDT) References: <12b2c37e-7389-d46a-8938-51b3285fd97c@inria.fr> User-agent: mu4e 1.4.15; emacs 27.2 From: Ricardo Wurmus To: Philippe SWARTVAGHER Subject: Re: Package variant defined in manifest not visible by Guix In-reply-to: <12b2c37e-7389-d46a-8938-51b3285fd97c@inria.fr> 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: Mon, 16 Aug 2021 16:34:55 +0200 Message-ID: <87eeath300.fsf@elephly.net> 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@elephly.net; 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629124535; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=K4PewGp6AT3uHQwPDfeID8X2cBUu69fGAShGfI1L654=; b=sp+r5/4msxhGsuQe1/KTswnsaRzl7EPthTevTVhxBsSFfcL7+NxtaA2DzHe3EEn3AFGu53 Yegl+YsRcPXQdAEl4Sg3lTmMY8nwzX/Sro51/NoW1VX5MvTcNW721pV4SufB9cc00ZAb2j XmEBES62zDAFf8fGrgnJZGGr3XiRE5MKqRH5IHYBVshlIh8oRl1hsxfozatIbsqWiRI2Mb cKHXzsE6vitM3nqD1HwQXyaSmb2bABwP+LuP0POsa7Xpt/duBMNdUvW1Wy4LD9OxLs5+Xt hGBO1zX+8JLeo1WsPOmKBFefVj+2+bE3KQXATRj1zPYaf4nP77emOynZXnoJgg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1629124535; a=rsa-sha256; cv=pass; b=dBsPwZNf1xIw+6p+4/sfaKRFz4QJZozV00X1RWzNVll13VuD4/KDUiTDOgCP7xET4kI3b6 Y7hc2G0L+F2MY3NtPy65kizU5u0czCC+SgVc1Jdu8QxQraz2l7Eh6oLSRzFlTHgnAq74Im m9c809ZY2nLScssTulyj2jZn61s0/DiAcwRNqiiguvjufZE/JyXJOm6bm9gWEr2kErksCV 7owFmocfhr2VTbMLJVRRDKjxYPZUtMMLDMKLaxirCdeFULy7Yh2pQJtbYU5vVOTZZ5pv9o 4FAxw5n1IKn6OOmxcOrY740MjmXGUzKmE/UZM4VHJ+8przjdZyI/agwH7j7mdQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=GuoKbLWm; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -3.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=GuoKbLWm; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 17C1A2B1D5 X-Spam-Score: -3.61 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1QLXMK1v9Hrn Hi, > I'm trying to use a manifest file to define a package variant=20 > which adds > an option to the configure phase: > > ``` > > (use-modules (inria storm)) > > (define starpu-maxnodes1 > (package > (inherit starpu) > (arguments > (substitute-keyword-arguments (package-arguments starpu) > ((#:configure-flags flags=20 > '()) > `(cons=20 > "--enable-maxnodes=3D1" > ,flags)))))) > > ``` > > When I'm trying to build this variant, guix can't find it: > > ``` > > % guix build -c 2 -m starpu-maxnodes1.scm starpu-maxnodes1 > guix build: erreur : starpu-maxnodes1 : paquet inconnu > > ``` > > I don't see what I'm doing wrong. Any idea ? There seems to be a small misunderstanding. You defined a package=20 variant, but that=E2=80=99s not a manifest. A manifest describes the=20 complete contents of a profile; i.e. it=E2=80=99s a list of packages that=20 Guix should install. Here are three different ways that should work for you: 1) Build a single package from a file. Here we define the package variant in a file and make sure that=20 the file evaluates to the package value: --8<---------------cut here---------------start------------->8--- (use-modules (inria storm)) (define starpu-maxnodes1 (package (inherit starpu) (arguments (substitute-keyword-arguments (package-arguments starpu) ((#:configure-flags flags '()) `(cons "--enable-maxnodes=3D1"=20 ,flags)))))) ;; Make sure the file evaluates to the package value. ;; The definition alone has no specified return value. starpu-maxnodes1 --8<---------------cut here---------------end--------------->8--- Now we can build the package specified in the file: guix build --file=3Dthis-file.scm 2) Build a whole manifest from a file. Here the file must evaluate to a manifest value, not just a single=20 package. --8<---------------cut here---------------start------------->8--- (use-modules (inria storm)) (define starpu-maxnodes1 (package (inherit starpu) (arguments (substitute-keyword-arguments (package-arguments starpu) ((#:configure-flags flags '()) `(cons "--enable-maxnodes=3D1"=20 ,flags)))))) (packages->manifest (list starpu-maxnodes1)) --8<---------------cut here---------------end--------------->8--- Then build the profile from the manifest file: guix build --manifest=3Dthis-file.scm 3) Create a module and use it however you want. You can make the custom package available to any Guix command by=20 putting it into a Guile module and then informing Guix about the=20 module. This is a little more effort as you need more boilerplate=20 code to define the module (and the file name needs to match the=20 moule header, etc). --8<---------------cut here---------------start------------->8--- (define-module (my packages storm) #:use-module (gnu packages) #:use-module (guix packages) #:use-module (guix utils) ;; =E2=80=A6 #:use-module (inria storm) #:export (starpu-maxnodes1)) (define starpu-maxnodes1 (package (inherit starpu) (arguments (substitute-keyword-arguments (package-arguments starpu) ((#:configure-flags flags '()) `(cons "--enable-maxnodes=3D1"=20 ,flags)))))) --8<---------------cut here---------------end--------------->8--- Put this in a file =E2=80=9Cmy/packages/storm.scm=E2=80=9D and then set the= =20 GUIX_PACKAGE_PATH environment variable to the directory containing=20 =E2=80=9Cmy=E2=80=9D (e.g. $HOME/code/guix/custom containing=20 $HOME/code/guix/custom/my/packages/storm.scm). Note that you haven=E2=80=99t overridden the =E2=80=9Cname=E2=80=9D field o= f the original=20 =E2=80=9Cstarpu=E2=80=9D package, so on the command line the package cannot= be=20 distinguished (unless you use =E2=80=9C-e '(@ (my packages storm)=20 starpu-maxnodes1)'=E2=80=9D). Do this to also change the name on the=20 command line: --8<---------------cut here---------------start------------->8--- (define starpu-maxnodes1 (package (inherit starpu) (name "starpu-maxnodes1") (arguments (substitute-keyword-arguments (package-arguments starpu) ((#:configure-flags flags '()) `(cons "--enable-maxnodes=3D1"=20 ,flags)))))) --8<---------------cut here---------------end--------------->8--- Hope this helps! --=20 Ricardo