From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0DgGD98NHWEiZwEAgWs5BA (envelope-from ) for ; Wed, 18 Aug 2021 15:40:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WD+4Ct8NHWGwAwAAB5/wlQ (envelope-from ) for ; Wed, 18 Aug 2021 13:40:47 +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 6D5491CD00 for ; Wed, 18 Aug 2021 15:40:46 +0200 (CEST) Received: from localhost ([::1]:53524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGLoD-0003k1-1U for larch@yhetil.org; Wed, 18 Aug 2021 09:40:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47568) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGLo2-0003js-VN for help-guix@gnu.org; Wed, 18 Aug 2021 09:40:35 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:46871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGLo1-0005UJ-7n for help-guix@gnu.org; Wed, 18 Aug 2021 09:40:34 -0400 Received: by mail-wm1-x330.google.com with SMTP id h24-20020a1ccc180000b029022e0571d1a0so1800185wmb.5 for ; Wed, 18 Aug 2021 06:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=pNbZ8mg0D+PUuMe7sbGpIhSks/gQPlzdcgDab4jxveA=; b=n5cbN74fZ7WGvxMjNwWu9LpPTVnNWiHdxFGcSLBZ/i1mKCLqWmPRM4dOpk54rJbGX0 XTPa0Ggs2XdMk4t2r44NUEsXSDG8Eg4mLmHbIIaIqRhsidGb9bmg/+YuwZmIjXVkl2vp h3kvOUuKXZBdVH7ReYNnZ5lGsaCr6T/c8hgunSdpOscl1D6Ap3pEwea6ZVyYuqQ1PqzQ xlzP1BO+J5QYbCPGcuU3Sr1ULVg2QeIFcxMu+Rp9K+5DAwhaD9CnfRB8VT0cWmZeWjQC W6tw4cVr17mLohPQTke74EEH2AamY9PO0KnwqcE+jlI/zhyxhYh3gHl29Y/7F0HkHFKq aPxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=pNbZ8mg0D+PUuMe7sbGpIhSks/gQPlzdcgDab4jxveA=; b=GIcfyk2/mnT2ARymkK3MPKu+IbHSLTZpqDoQmPZr4dbfLn6RZegPWpbAJw8HWsquh3 jKXWKoOIv3hY5+tXBlzZiiggK/r6SswCTEvsl/UtYeEN2WbIwY0X/S9cAFtwnSmTl7+B SS7Dn1RsZoe29hQxmf+bUT0lX1KocVOpTMoMHm+oh9jo/wd/3nZoQ1g9JtehLYyJI+8q 5UBfNFWhoBuNqm8NRM2tp2LJAbKSLiK8NWOq0Mg6qcomH61o+bUa3fwg+OBJLK63J9E0 yvODAnhW9rY6SUWEisqL1n1BlLV/8LdAEmcKr8qs/hAxvgGeyQ79+C8Q2X/gADP1PvHs hhhA== X-Gm-Message-State: AOAM533AvYDaoiumndH8SlMZYQjjESw/66dz8GcpaLb9o109/VbwP4Dm qwj3OHnCOKluGBlv3ZcgIiNMUVYvNbGceA== X-Google-Smtp-Source: ABdhPJyEZLzqKs9TBll/NiwdydoAnOCCJXO3U4q6g+Y/pGOerrTf1gZudS32NvcKeKGZiT1jeBoVrQ== X-Received: by 2002:a1c:7c19:: with SMTP id x25mr8408146wmc.172.1629294031950; Wed, 18 Aug 2021 06:40:31 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id r10sm5923385wrp.28.2021.08.18.06.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 06:40:31 -0700 (PDT) From: zimoun To: Philippe SWARTVAGHER , help-guix@gnu.org Subject: Re: Package variant defined in manifest not visible by Guix In-Reply-To: <292c1173-3ff6-47b0-2da0-487ef491a133@inria.fr> References: <12b2c37e-7389-d46a-8938-51b3285fd97c@inria.fr> <87eeath300.fsf@elephly.net> <292c1173-3ff6-47b0-2da0-487ef491a133@inria.fr> Date: Wed, 18 Aug 2021 15:21:14 +0200 Message-ID: <86fsv6lwhh.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x330.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629294046; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=pNbZ8mg0D+PUuMe7sbGpIhSks/gQPlzdcgDab4jxveA=; b=ipWc6dawKuTqVsfBNANlXZgzSa/pWXkCt2s2DGQ/5aa+maJ67oJuOO1V6mi75wxbebztmi GHomKoIi5lykK/x45EjkyFkisSivOCE7VkXXAHwx8QNQ+/gGI0Rgv44FOxEVYCMf80/fE1 r4PT2gHr7Ov0R/aq9iNfK8c4jp6rhZl30xE+rUhkjha8T+l3UHvseWK7vzpXLJRYf3t5Zy MTL3jKLlpHarfuI9Su7KSi8Lar6Oh5KmqdRJt1uw1ACZSiNxutem+fw9fl9BZWsq3Mmtws RtoEmsAutfSNOxcb1ljy5t72uK3LKJw3y3ZSGOmbF0HonOKiq7YwhUFS0UIv2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629294046; a=rsa-sha256; cv=none; b=kynCgIQEWv52Ci7iJuaxRL12lhek4YQeM0hhaRkpvb1WytWxQzFeGODRDWIQ0CyeQcV4yS oHEdmeuJKbVbcLajOjoeIkM7Yq8wBx6/AmycrXWkoGyoratLoZXtNTe5UEr1lBROeY2hVz s7N3e20vnK4QN1SPrM4OU+kGuJMwRfxqzbl1jC3mhEJMejVx1Ip960YUwTR/nzvqxQeF54 hAdikAF0pShKkXBTPjYHN9/8TkWbkecVao8vt490f5Xilc8USpBfUyS9q8fNEYaucTcX2j evkzZxewOOEv+V67HsRII8SMGRYVegTb9UGdSZUWBIqSYhxa9VA7QOUFRsW53Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=n5cbN74f; dmarc=pass (policy=none) header.from=gmail.com; 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.12 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=n5cbN74f; dmarc=pass (policy=none) header.from=gmail.com; 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: 6D5491CD00 X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: YrqyDvdmYa0h Hi Philippe, On Wed, 18 Aug 2021 at 10:57, Philippe SWARTVAGHER wrote: > Le 16/08/2021 =C3=A0 16:34, Ricardo Wurmus a =C3=A9crit=C2=A0: >> There seems to be a small misunderstanding.=C2=A0 You defined a package >> variant, but that=E2=80=99s not a manifest.=C2=A0 A manifest describes t= he complete >> contents of a profile; i.e. it=E2=80=99s a list of packages that Guix sh= ould >> install. >> >> Here are three different ways that should work for you: >> >> 1) Build a single package from a file. >> >> Now we can build the package specified in the file: >> >> =C2=A0=C2=A0 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 >> package. > > Ok, I was missing the line to evaluate to a manifest, instead of a > single package. > > >> Then build the profile from the manifest file: >> >> =C2=A0=C2=A0 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 >> putting it into a Guile module and then informing Guix about the >> module.=C2=A0 This is a little more effort as you need more boilerplate >> code to define the module (and the file name needs to match the moule >> header, etc). >> >> Hope this helps! > > Sure, it helps ! Thanks a lot ! However, I still have some questions: > > - I don't really see the difference, or more precisely: the difference > of goal, between defining the package in a simple file (solution 1) and > using a manifest (solution 2). Solution #1 (option --file) builds the package defined by FILE. Solution #2 (option --manifest) builds the packages listed in FILE. > - The following command builds the package as defined in the *file*, > without running tests: > > guix build -c 2 -f starpu-maxnodes1-file.scm > --without-tests=3Dstarpu-maxnodes1 > > So package transformations seem to work. However: > > guix build -c 2 -f starpu-maxnodes1-file.scm chameleon > --with-input=3Dstarpu=3Dstarpu-maxnodes1 --with-input=3Dopenblas=3Dmkl > --without-tests=3Dstarpu-maxnodes1 > > doesn't work: starpu-maxnodes1 is an unknown package... > > The same happens if I use a manifest instead of a file to define > starpu-maxnodes1: > > guix build -c 2 -m starpu-maxnodes1.scm --with-input=3Dopenmpi=3Dnmad > --without-tests=3Dstarpu-maxnodes1 > > works (without running tests), however: > > guix build -c 2 -m starpu-maxnodes1.scm chameleon > --with-input=3Dstarpu=3Dstarpu-maxnodes1 --with-input=3Dopenblas=3Dmkl > --with-input=3Dopenmpi=3Dnmad --without-tests=3Dstarpu-maxnodes1 > > doesn't. I think what you want is the option --load-path. Create a folder and put the file starpu-maxnodes1.scm inside; for instance =E2=80=99/tmp/example/starpu-maxnodes1.scm=E2=80=99. Then, the command-lin= e: guix build -c 2 -L /tmp/example chameleon --with-input=3Dstarpu=3Dstarpu-= maxnodes1 should do the job. In this case, the file =E2=80=99/tmp/example/starpu-maxnodes1.scm=E2=80=99 does not have to return= a package or a manifest but instead define a module. Does it make sense? > I guess I have to put all transformations of several packages in a > single manifest, one cannot combine manifest and CLI options; packages > defined in manifest aren't available for use in CLI transformations > (although the working --without-tests seems to be a counter argument). > Am I right ? As Ricardo explained, the aim manifest is to describe the complete contents of a profile, so from my understanding, the manifest should also contain the transformation. Well, I think what you want is the option =E2=80=99--load-path=E2=80=99 and= not a manifest or the option =E2=80=99--file=E2=80=99. Hope that helps, simon