unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Antero Mejr <mail@antr.me>
To: 75130@debbugs.gnu.org
Cc: andrew@trop.in, janneke@gnu.org, ludo@gnu.org, tanguy@bioneland.org
Subject: [bug#75130] [PATCH] home: Load system profile in setup-environment.
Date: Thu, 26 Dec 2024 18:27:30 -0500	[thread overview]
Message-ID: <87a5ci10v1.fsf@antr.me> (raw)


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-script 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-script vars)
 PROFILE_FILE=\"$HOME_ENVIRONMENT/profile/etc/profile\"
 [ -f $PROFILE_FILE ] && . $PROFILE_FILE
 
+SYSTEM_ENVIRONMENT=$HOME/.guix-profile
+SYSTEM_PROFILE_FILE=\"$SYSTEM_ENVIRONMENT/etc/profile\"
+[ -f $SYSTEM_PROFILE_FILE ] && . $SYSTEM_PROFILE_FILE
+
 case $XDG_DATA_DIRS in
   *$HOME_ENVIRONMENT/profile/share*) ;;
   *) export XDG_DATA_DIRS=$HOME_ENVIRONMENT/profile/share:$XDG_DATA_DIRS ;;

base-commit: e4bdd464ebb49f4e698e5105f70b29688fff9475
-- 
2.47.1





             reply	other threads:[~2024-12-26 23:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-26 23:27 Antero Mejr [this message]
2024-12-27 10:08 ` [bug#75130] [PATCH] home: Load system profile in setup-environment Andrew Tropin via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a5ci10v1.fsf@antr.me \
    --to=mail@antr.me \
    --cc=75130@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=janneke@gnu.org \
    --cc=ludo@gnu.org \
    --cc=tanguy@bioneland.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).