From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id OJOPNtV8bmdgRAAAe85BDQ:P1 (envelope-from ) for ; Fri, 27 Dec 2024 10:09:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id OJOPNtV8bmdgRAAAe85BDQ (envelope-from ) for ; Fri, 27 Dec 2024 11:09:25 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=WQaSmHEZ; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=key1 header.b=eLy77aWr; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735294165; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=SvCwMYD8VyAd8uGSbeyVNj07kfNex+RAGYU53zbidfM=; b=JKmxSqKGq+VHy7sxX62KLJ2MgVszt+Dpbd745WOPNq0w6eqLqe8k05wV3laXZFhhJqZ61O UEaVtojryYhSkfK7LSEIXSFrwRTRy/XIE8fHJh5sMGd2WOveLZkjE7dtmqgx6tqy9J/5XZ TGtlYsbX9PWEQFwtjysWXbow1MTUtpEfZebWP1o11mDoiv/16VR6i8DTiv8tzaC5ZIHNzU doMYhcMYUToCmZfFZeOC2irE+Ktz0/2U6sPvhWDhnPFnVdNiQKHaVt8VTUWeAoFZxeMd28 oLY00M1XZ8I0Bj/SB2alas3u8HlT1zHa0CEHKvjmGs/gzUeUn0zxhfjStmJFlw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=WQaSmHEZ; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=key1 header.b=eLy77aWr; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735294165; a=rsa-sha256; cv=none; b=N3Lc7/DKebOba6ghySxSN77JBJSlrLEEIs5AV0ITEt5Ti9KMSK8q0jnVNHRjtU+VTTJ0Lt dxFio44GoSnJCchPZeOuQheMTpHmvgBmNPflrHLgRNvgcaI/XUXvfSZix8Hxqv5zq/jb/e 16vPp4lEpInTfxn89NrFBOK8PAfp2yapAftYJUYCDGCqSGDGBOzdvBM47wo696oV1ExSJQ WWPeBHq4IIZUYQuPxonC2AZVDBtoWYwc4ScIBP3X3cBdGoGzXIhZcG5+VN0oldC6VBN5nd d6DgJuxmaahGgxGq3nB6jPt6NZtYuCymIU5F5Sn/6k//v0jAEQ1DGvveoDIWQA== 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 784CA80AA9 for ; Fri, 27 Dec 2024 11:09:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tR7HH-0003im-3c; Fri, 27 Dec 2024 05:09:07 -0500 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 1tR7HD-0003iM-Ch for guix-patches@gnu.org; Fri, 27 Dec 2024 05:09:05 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tR7HD-0007Fl-43 for guix-patches@gnu.org; Fri, 27 Dec 2024 05:09:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=SvCwMYD8VyAd8uGSbeyVNj07kfNex+RAGYU53zbidfM=; b=WQaSmHEZupzVYOo7S1tmM0M4HJBGW5gtvMK0DAT2wZqRT+J4GHVntb4VhYfWslwILd3UB58X3bckmWZRnN7KrSnG11zPp5YeusZl9sZjfuKAT2tAgE5R7A8PDqC1W7IfHpsKN54kIqQ0kEYOSfLLgHQyPbQZF9buTRT601waUU8Mc0au6CMt5zQsAJ7l+31aQnpik2lBuZEnp/D2HiB0x+HAdhT3o8tZ5qqNulDccKfxkxiyoD9TTpDreqWvakdfma4A9MpHivJOxUi//U4lufqrxHewKs4SLWRXB24S7m8QxHfOxudZT0+mCDpnitqkGi13DhJQ6ZoDfNX2Cvk6Dw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tR7HB-0007m8-TT for guix-patches@gnu.org; Fri, 27 Dec 2024 05:09:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75130] [PATCH] home: Load system profile in setup-environment. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 Dec 2024 10:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75130 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Antero Mejr , 75130@debbugs.gnu.org Cc: ludo@gnu.org, tanguy@bioneland.org, janneke@gnu.org Received: via spool by 75130-submit@debbugs.gnu.org id=B75130.173529413129868 (code B ref 75130); Fri, 27 Dec 2024 10:09:01 +0000 Received: (at 75130) by debbugs.gnu.org; 27 Dec 2024 10:08:51 +0000 Received: from localhost ([127.0.0.1]:44749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tR7H0-0007lf-SC for submit@debbugs.gnu.org; Fri, 27 Dec 2024 05:08:51 -0500 Received: from out-182.mta0.migadu.com ([91.218.175.182]:16540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tR7Gw-0007lN-4f for 75130@debbugs.gnu.org; Fri, 27 Dec 2024 05:08:48 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=key1; t=1735294090; h=from:from: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; bh=SvCwMYD8VyAd8uGSbeyVNj07kfNex+RAGYU53zbidfM=; b=eLy77aWr3foONselAWE7VwHidWUl2IetzXyLT72Cu0nVK8z8Uxe121FDewNQ5vVV+V8RVK yxEVE+HHYewKcAlvV7WnmNrXGANbgcw4202iWsYDweMVoHJSioHIYBH4upFQtQ+03jSZls aqAze4gPvC1OcWNaQLrP5gesGYRO6lQykL0FceIJW2f6ckUW1Rp4H7JqTV3MWxtuF2RbJW GtIbdzm/97LIBpz6GAuacfQ1oClJK6ANCZhGDcFb+dFSBoV/tmpcAsWPXwF20j73kTK9g3 SBs0TFvQdG38ibXxhzOycpVu80sfoGUc3yaG0vK93cmsGdf2o1F5L6WZvyfGyg== In-Reply-To: <87a5ci10v1.fsf@antr.me> References: <87a5ci10v1.fsf@antr.me> Date: Fri, 27 Dec 2024 14:08:04 +0400 Message-ID: <87seq9moaj.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Andrew Tropin X-ACL-Warn: , Andrew Tropin via Guix-patches From: Andrew Tropin via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -5.31 X-Spam-Score: -5.31 X-Migadu-Queue-Id: 784CA80AA9 X-TUID: 0WcJuPx1cnf+ --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2024-12-26 18:27, Antero Mejr wrote: > This ensures packages installed with `guix install` are available on > $PATH when using Guix home with a foreign distro. > > * gnu/home/services.scm (environment-variables->setup-environment-script): > Load system profile while loading home profile in setup-environment. > > Change-Id: I96b047b92f3c050b15e521fecc96740390cae2ca > --- > gnu/home/services.scm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/gnu/home/services.scm b/gnu/home/services.scm > index 39c9033ad6..1cf5ce0835 100644 > --- a/gnu/home/services.scm > +++ b/gnu/home/services.scm > @@ -268,8 +268,6 @@ (define (environment-variables->setup-environment-scr= ipt vars) > %store-monad > (return > `(("setup-environment" > - ;; TODO: It's necessary to source ~/.guix-profile too > - ;; on foreign distros > ,(computed-file "setup-environment" > #~(call-with-output-file #$output > (lambda (port) > @@ -280,6 +278,10 @@ (define (environment-variables->setup-environment-sc= ript vars) > PROFILE_FILE=3D\"$HOME_ENVIRONMENT/profile/etc/profile\" > [ -f $PROFILE_FILE ] && . $PROFILE_FILE >=20=20 > +SYSTEM_ENVIRONMENT=3D$HOME/.guix-profile > +SYSTEM_PROFILE_FILE=3D\"$SYSTEM_ENVIRONMENT/etc/profile\" > +[ -f $SYSTEM_PROFILE_FILE ] && . $SYSTEM_PROFILE_FILE > + IIRC, it called user profile. /etc/profile on Guix System already contains this: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system.scm?h=3D092467b3= b6#n1085 Unconditionally sourcing it two times is not the best idea (while it probably will work most of the time, still feels wrong and probably can cause unexpected issues). There is a reason why GUIX_PROFILE is set before sourcing profile file. Its value used to set PATH and similiar variables to ~/path/to/profile/bin instead of /gnu/blabla-profile/bin, so in case of changing of ~/path/to/profile content/symlink all respective variables don't require updates. > case $XDG_DATA_DIRS in > *$HOME_ENVIRONMENT/profile/share*) ;; > *) export XDG_DATA_DIRS=3D$HOME_ENVIRONMENT/profile/share:$XDG_DATA_DI= RS ;; > > base-commit: e4bdd464ebb49f4e698e5105f70b29688fff9475 =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmdufIQACgkQIgjSCVjB 3rDFRhAAi6kCH0GBzm95WhDiYQNABSUtnh5VgKxbcSnOqWWNlQqILHFgGvAnj8fX SYTgLozybL64+KmHSSsw77NFqMkhPsYEYM3CoWHrLr6pUKNQhMn8+kdvQ6NCkWVD qBavhTjCnafbGllhZlCoDERY+Hqf9IlaMj2V1BUC5LUHjdBlVCHl495eFJ2EucSS OhAHK2hM5PoX5XtjeUwLv651OaciHgGWRQc3/T5CpNxS9ulw53vF8D+Nm/hzWdBe G6swpqHa6Z+7DhzZog795RO0k+xQ8xtnVFBhpQMz3bF7+lMb0fGT8ahnioQzGxzW K6J+BHiaiFqXKkiuyfz8v9WVs+hc8ts2V+Jg+kiqqYVsD7HDlCbVAhTNh+xYL/k3 np+RUaX1WtmpMpKGLlVwGGtTTGnuNGtsJJuWtiQ2FOEvxA9ICYrToT5++/QYckRk yjcdLohbuqcGRDFAxm/aMTVzbD4gWXk8qVNGQX/MR0umKsMfqlxTu112GR1des06 mhvpmfGJk5EwCwC7bBKhD5vu+v03+pJkQz42EXXoTgOGrwpvP1DsBJBNp5gJwARY 0h115dYQ4S4VKawVTzml/poaSSHe8sBkj7U1TypGPxdlfBSgI1lY/kFvlgLMF1Jg zRNfBl2pw08EC3L1++tt2V9vt+FDVkhroExWeD8c8TKinVRQ6h8= =/Evr -----END PGP SIGNATURE----- --=-=-=--