From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MFyJF9/MdGTz8gAASxT56A (envelope-from ) for ; Mon, 29 May 2023 18:03:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UAVmF9/MdGR5JgAAauVa8A (envelope-from ) for ; Mon, 29 May 2023 18:03:43 +0200 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 0062C2B221 for ; Mon, 29 May 2023 18:03:43 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3ej9-0003ms-Kh; Mon, 29 May 2023 11:24:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1v3E-0003wb-VR for guix-devel@gnu.org; Wed, 24 May 2023 16:25:40 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1v3C-0006w5-3I for guix-devel@gnu.org; Wed, 24 May 2023 16:25:40 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-51190fd46c3so2635006a12.1 for ; Wed, 24 May 2023 13:25:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684959935; x=1687551935; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/Xsk5zvchcMz5xPyKpy6HUj2OZreLEL22U4kv6XITQ0=; b=paTINYTsPBksud0jBvGdHHbgD8vONDY0xIQgC20azOLfdZxGeUqI5Iykey3vNbNEoC rUTjg5V4hkDvd/apDCVSONefvxaGaTc6AJPHIfqFU4ypLFddGgIgkXg6bHf/b51NyA25 Jp/uyNWaNW1ZB/cGN57HCRXsFMZHW6jo+nNQkuW/bGqGCsnfPuu1Oa0Zr6f11KOVhWr7 koG4wbR8/cxV5JBvgIvA7dkWPisXvPP7YqcnsvipsykPN2/izMKs47uSvh3ugKIuKs/A 7fd1cqNEZBlyUw9fZyYtZAllCEHz8FxgLl0uATku0oEoCXTcgnf2CzO4euFLGy62copR PmkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684959935; x=1687551935; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/Xsk5zvchcMz5xPyKpy6HUj2OZreLEL22U4kv6XITQ0=; b=Hr7tuMMlEB/5wNCqzehpO0kov6gMf6wCTJNeogX/qdy0MUQfzM/Xl8XOFwiqgbbgrU Dym3/A3ce6h9lQhdwVYmosuCrnI7KL7tf8maQRs17g5ovpnTEYakaa4Zf9B70tYtUCxy 7CNZDsk2Tgz76Qyb9+xnBpk5GK+ja3SaYnaP9b+V639KE6LR0NT1loZMtTxgaD8zurD1 vVXauF3UhQIQlfcK/q2iQBBLcKXqyZ5Bw+3hbhwAYnYfxZ73JaZQVzJYGasRetwOo12L 3H1zisPNLd7QzwiP1UN3CzXQURHGPukFLcBfspNUiQZt5taPVz/3ND6h0mfkvPxBt6m2 g3XA== X-Gm-Message-State: AC+VfDwKFiVkvL8vrITdO+mKVQocezhpvi7GFXdpG2Isd6UCmN/CBq7Q Hqw1lodFhkBsSHq5mty4FpiNBop/tlp77GfjcjVgt/So2ofggg== X-Google-Smtp-Source: ACHHUZ76thSAbfOHxjbanI7dJn9TelHS9aa4H++2ZR0KUCIr9R6YjGUsLjYpw43i2R8eTpoCevRwKOLajI3RmnJ1cCk= X-Received: by 2002:a17:907:2d9f:b0:96f:a0ee:114b with SMTP id gt31-20020a1709072d9f00b0096fa0ee114bmr13963035ejc.21.1684959934927; Wed, 24 May 2023 13:25:34 -0700 (PDT) MIME-Version: 1.0 References: <875y8oz4ab.fsf@gmail.com> In-Reply-To: From: Timothy Washington Date: Wed, 24 May 2023 16:25:23 -0400 Message-ID: Subject: Re: Howto reference a custom package from a manifest To: Kaelyn Cc: Simon Tournier , Guix Devel Content-Type: multipart/alternative; boundary="00000000000061d88105fc764e3e" Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=twashing@gmail.com; helo=mail-ed1-x534.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, WEIRD_QUOTING=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 29 May 2023 11:24:06 -0400 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list 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+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685376223; a=rsa-sha256; cv=none; b=Y0ObmTraZBqxabcwe96FYsh7OuSYXe1BT6BKrsqCPLrlck6MDW9YQuLxhk9Lpzf/qyH2Ad oVNBmlo5P8fNjwVb9cFQ26Hp010nHmfUtvrYExdTdQvBhLO49dK4Sghp9F5Vh8iPb8TVAs vE/fqtIWZpZSVA2z/scq6G3OvsRq2l4boLRI3a7FLTsOtgNZzmOowh7hmrT/nBVKfRcqts oxQ7J5PuLS14MMxPBgHuIKX4sZmpE5mk9tP+CUSMsdMGziwLe0JNRi/nh1XDf+EgniWBeY 1jnJoDX95cHwNV7tJ/WhJzi6/7ijm6OZ0gOtQLkoY+facHXnCqj1+v5NCv4e0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=paTINYTs; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685376223; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/Xsk5zvchcMz5xPyKpy6HUj2OZreLEL22U4kv6XITQ0=; b=BEthDupaujMHWm/WthTHf82m1j0/K1wqptMIW/I69hMlhhEVhzgAAwLb3xo6NhynH5stpB DmgZqyp1fw4uCsrCcNMuOTDV86QTS/P3xslBahQ49800DnCeTmgjIeNOIBcR9kIJ1WSI6W yzbPuWuzLVOjEb2v7zQW9YMus/5RejE+EQaUeCc552W7QV9wci/2qVAvQg6Xtn3CHpB0wQ +BxrwAOn6d9FlNnQgcL73ZHauzjQTT8XV+gs89ef83tBCqYyrgrwodm59qh3h//PR6GqCt d75zDHZiY0WvEkgMX0QpHhMgFFETgsVlkjDvCKqB3hrxfxG4NbmYdPSwEWbyDw== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=paTINYTs; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.30 X-Spam-Score: -5.30 X-Migadu-Queue-Id: 0062C2B221 X-TUID: DCVpBOpVXgVQ --00000000000061d88105fc764e3e Content-Type: text/plain; charset="UTF-8" *.* This is expected. When you ran the "guix package -L ~/dotfiles/ -m ~/dotfiles/guix/packages/manifest.scm" command above, that not only built the manifest but also used the manifest to create a new generation of /home/twashing/.guix-profile. Ah I see. *.* If you run "guix package --list-generations" you should see a list of all of the existing (numbered) generations with the currently active generation marked (it's typically the last / latest generation, and should be in this case). . Running "guix package -I" will list the packages in the current generation of your default guix profile, which should contain the packages in your manifest. *.* To go into more details about how profiles work: unless you specify the "-p" argument to "guix package", it will operate on your default profile when installing or removing packages (including through using manifests with "-m"), and create a new generation when the set of installed packages changes. *.* /home/twashing/.guix-profile is a symlink to /var/guix/profiles/per-user/twashing/guix-profile, which in turn is a symlink to one of the numbered symlinks in that same /var/guix directory (i.e. if your current generation number is 14, then /var/guix/profiles/per-user/twashing/guix-profile will point to /var/guix/profiles/per-user/twashing/guix-profile-14-link). *.* Each of those numbered symlinks points to the actual profile in /gnu/store, so using that hypothetical generation 14 as the one created by your "guix package -m" command above, /var/guix/profiles/per-user/twashing/guix-profile-14-link would be a symlink to /gnu/store/sqaz4ff2nshfizfh8ymbzllia6lsgnfv-profile. This is really useful for my understanding. Thank-you! But when I restart my machine, the currently installed tools (from "guix package -i foo") are not available on login. For example, I manually ran "guix package -i tree git". And after restarting my machine, those were no longer available, even though presumably they should have been part of my latest generation. I do remember trying to load the tools like below. But git and tree were still not available. ". /home/twashing/.guix-profile/etc/profile" Are tools in generations cumulative? And how can I load the cumulative sum of all my generations, and any custom profiles I create? Thanks again Tim On Tue, 23 May 2023 at 12:39, Kaelyn wrote: > Hi Tim, > > ------- Original Message ------- > On Monday, May 22nd, 2023 at 8:20 PM, Timothy Washington < > twashing@gmail.com> wrote: > > > > Yes that was it! I added "(native-inputs (list perl python))" to my > package definition. > > $ guix build -L ~/dotfiles/ rust-rustscan # A. Now builds again! > > /gnu/store/4bldy27x1f2mzjqg5jd176nrawl98y1y-rust-rustscan-2.1.1 > > > > $ guix package -L ~/dotfiles/ -m ~/dotfiles/guix/packages/manifest.scm # > B. Now also builds! > > ... > > The following derivation will be built: > > /gnu/store/xll763hpl7mvdkxd3kf8f98pygarzh41-profile.drv > > > > ... > > > > guix package --list-profiles # C. does NOT show the custom profile just > built > > /home/twashing/.config/guix/current > > /home/twashing/.guix-profile > > This is expected. When you ran the "guix package -L ~/dotfiles/ -m > ~/dotfiles/guix/packages/manifest.scm" command above, that not only built > the manifest but also used the manifest to create a new generation of > /home/twashing/.guix-profile. If you run "guix package --list-generations" > you should see a list of all of the existing (numbered) generations with > the currently active generation marked (it's typically the last / latest > generation, and should be in this case). Running "guix package -I" will > list the packages in the current generation of your default guix profile, > which should contain the packages in your manifest. > > To go into more details about how profiles work: unless you specify the > "-p" argument to "guix package", it will operate on your default profile > when installing or removing packages (including through using manifests > with "-m"), and create a new generation when the set of installed packages > changes. /home/twashing/.guix-profile is a symlink to > /var/guix/profiles/per-user/twashing/guix-profile, which in turn is a > symlink to one of the numbered symlinks in that same /var/guix directory > (i.e. if your current generation number is 14, then > /var/guix/profiles/per-user/twashing/guix-profile will point to > /var/guix/profiles/per-user/twashing/guix-profile-14-link). Each of those > numbered symlinks points to the actual profile in /gnu/store, so using that > hypothetical generation 14 as the one created by your "guix package -m" > command above, /var/guix/profiles/per-user/twashing/guix-profile-14-link > would be a symlink to /gnu/store/sqaz4ff2nshfizfh8ymbzllia6lsgnfv-profile. > > > > > > > cat /gnu/store/xll763hpl7mvdkxd3kf8f98pygarzh41-profile.drv # D. DOES > show the new profile in /gnu/store > > > Derive([("out","/gnu/store/sqaz4ff2nshfizfh8ymbzllia6lsgnfv-profile","","")], > ... > ("out","/gnu/store/sqaz4ff2nshfizfh8ymbzllia6lsgnfv-profile"),("preferLocalBuild","1")]) > > > > > > i. Using a direct "guix build" gives you a directory in "/gnu/store". > And you can add that bin to your PATH. > > This is fragile and will work only as long as the package exists under > /gnu/store. Which is to say, this method will break as soon as "guix gc" is > run unless the package happens to be "live" as a member or dependency of > any existing generation of the system profile or other profiles (the > profile generation symlinks like the guix-profile-14-link mentioned above > are the garbage collector roots for guix, as can be seen with "guix gc > --list-roots"). > > > ii. But for "/gnu/store/*-profile/", would you just loop over those > profile directories, and run each "/gnu/store/*-profile/etc/profile"? > > This is a very bad idea, as many or most of those "/gnu/store/*-profile" > directories are different generations of the same profile, and sourcing > them all would result in many conflicts and other troubles, including > having unpredictable and likely outdated versions of commands being picked > up before newer counterparts. > > Cheers, > Kaelyn > --00000000000061d88105fc764e3e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
. This is expected. When you ran= the "guix package -L ~/dotfiles/ -m ~/dotfiles/guix/packages/manifest= .scm" command above, that not only built the manifest but also<= br>used the manifest to create a new generation of = /home/twashing/.guix-profile.

Ah I see.

= . If you run "guix package --list-generations" you should s= ee a list of all of the existing (numbered) generations with the currently = active generation marked
(it's typica= lly the last / latest generation, and should be in this case).
. Running "guix package -I" will list the p= ackages in the current generation of your default guix profile,
<= font color=3D"#666666">which should contain the packages in your manifest.<= /font>

. To go into more details about how profiles work: unless you s= pecify the "-p" argument to "guix package",
<= font color=3D"#666666">it will operate on your default profile when install= ing or removing packages (including through using manifests with "-m&q= uot;),
and create a new generation when t= he set of installed packages changes.

. /= home/twashing/.guix-profile is a symlink to /var/guix/profiles/per-user/twa= shing/guix-profile,
which in turn is a sy= mlink to one of the numbered symlinks in that same /var/guix directory (i.e= . if your current generation number is 14, then /var/guix/profiles/per-user= /twashing/guix-profile will point to /var/guix/profiles/per-user/twashing/g= uix-profile-14-link).

. Each of those numbered symli= nks points to the actual profile in /gnu/store,
so using that hypothetical generation 14 as the one created by your = "guix package -m" command above,
/var/guix/profiles/per-user/twashing/guix-profile-14-link would be a syml= ink to /gnu/store/sqaz4ff2nshfizfh8ymbzllia6lsgnfv-profile.

T= his is really useful for my understanding. Thank-you!

But when I res= tart my machine, the currently installed tools (from "guix package -i = foo") are not available on login.
For example, I manually ran "= ;guix package -i tree git". And after restarting my machine, those wer= e no longer available, even though presumably they should have been part of= my latest generation.
I do remember trying to load the tools like below= . But git and tree were still not available.
". /home/twashing/.gui= x-profile/etc/profile"

Are tools in generations cumulative?
= And how can I load the cumulative sum of all my generations, and any custom= profiles I create?

Thanks again
Tim=C2=A0
<= /div>


On Tue, 23 May 2023 at 1= 2:39, Kaelyn <kaelyn.alex= i@protonmail.com> wrote:
Hi Tim,

------- Original Message -------
On Monday, May 22nd, 2023 at 8:20 PM, Timothy Washington <twashing@gmail.com> wrote:=


> Yes that was it! I added "(native-inputs (list perl python))"= ; to my package definition.
> $ guix build -L ~/dotfiles/ rust-rustscan # A. Now builds again!
> /gnu/store/4bldy27x1f2mzjqg5jd176nrawl98y1y-rust-rustscan-2.1.1
>
> $ guix package -L ~/dotfiles/ -m ~/dotfiles/guix/packages/manifest.scm= # B. Now also builds!
> ...
> The following derivation will be built:
> /gnu/store/xll763hpl7mvdkxd3kf8f98pygarzh41-profile.drv
>
> ...
>
> guix package --list-profiles # C. does NOT show the custom profile jus= t built
> /home/twashing/.config/guix/current
> /home/twashing/.guix-profile

This is expected. When you ran the "guix package -L ~/dotfiles/ -m ~/d= otfiles/guix/packages/manifest.scm" command above, that not only built= the manifest but also used the manifest to create a new generation of /hom= e/twashing/.guix-profile. If you run "guix package --list-generations&= quot; you should see a list of all of the existing (numbered) generations w= ith the currently active generation marked (it's typically the last / l= atest generation, and should be in this case). Running "guix package -= I" will list the packages in the current generation of your default gu= ix profile, which should contain the packages in your manifest.

To go into more details about how profiles work: unless you specify the &qu= ot;-p" argument to "guix package", it will operate on your d= efault profile when installing or removing packages (including through usin= g manifests with "-m"), and create a new generation when the set = of installed packages changes. /home/twashing/.guix-profile is a symlink to= /var/guix/profiles/per-user/twashing/guix-profile, which in turn is a syml= ink to one of the numbered symlinks in that same /var/guix directory (i.e. = if your current generation number is 14, then /var/guix/profiles/per-user/t= washing/guix-profile will point to /var/guix/profiles/per-user/twashing/gui= x-profile-14-link). Each of those numbered symlinks points to the actual pr= ofile in /gnu/store, so using that hypothetical generation 14 as the one cr= eated by your "guix package -m" command above, /var/guix/profiles= /per-user/twashing/guix-profile-14-link would be a symlink to /gnu/store/sq= az4ff2nshfizfh8ymbzllia6lsgnfv-profile.

>
>
> cat /gnu/store/xll763hpl7mvdkxd3kf8f98pygarzh41-profile.drv # D. DOES = show the new profile in /gnu/store
> Derive([("out","/gnu/store/sqaz4ff2nshfizfh8ymbzllia6ls= gnfv-profile","","")], ... ("out","= /gnu/store/sqaz4ff2nshfizfh8ymbzllia6lsgnfv-profile"),("preferLoc= alBuild","1")])
>
>
> i. Using a direct "guix build" gives you a directory in &quo= t;/gnu/store". And you can add that bin to your PATH.

This is fragile and will work only as long as the package exists under /gnu= /store. Which is to say, this method will break as soon as "guix gc&qu= ot; is run unless the package happens to be "live" as a member or= dependency of any existing generation of the system profile or other profi= les (the profile generation symlinks like the guix-profile-14-link mentione= d above are the garbage collector roots for guix, as can be seen with "= ;guix gc --list-roots").

> ii. But for "/gnu/store/*-profile/", would you just loop ove= r those profile directories, and run each "/gnu/store/*-profile/etc/pr= ofile"?

This is a very bad idea, as many or most of those "/gnu/store/*-profil= e" directories are different generations of the same profile, and sour= cing them all would result in many conflicts and other troubles, including = having unpredictable and likely outdated versions of commands being picked = up before newer counterparts.

Cheers,
Kaelyn
--00000000000061d88105fc764e3e--