GNU bug report logs -
#77526
[PATCH v4 3/6] system: /etc/profile: Set up extra environment variables for Guix Home.
Previous Next
To reply to this bug, email your comments to 77526 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
andrew <at> trop.in, hako <at> ultrarare.space, janneke <at> gnu.org, ludo <at> gnu.org, tanguy <at> bioneland.org, guix-patches <at> gnu.org
:
bug#77526
; Package
guix-patches
.
(Fri, 04 Apr 2025 03:24:07 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Hilton Chain <hako <at> ultrarare.space>
:
New bug report received and forwarded. Copy sent to
andrew <at> trop.in, hako <at> ultrarare.space, janneke <at> gnu.org, ludo <at> gnu.org, tanguy <at> bioneland.org, guix-patches <at> gnu.org
.
(Fri, 04 Apr 2025 03:24:07 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/system.scm (operating-system-etc-service)[profile]: Set up extra
environment variables for Guix Home.
* gnu/home/services/shells.scm (add-shell-profile-file): Skip
setup-environment if already finished.
* gnu/home/services.scm (environment-variables->setup-environment-script):
Skip initializing home profile if already finished.
Change-Id: Ife4100c6b19f61272525eebc82931c81784fe9e0
---
gnu/home/services.scm | 6 +++++-
gnu/home/services/shells.scm | 6 +++++-
gnu/system.scm | 5 +++++
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 85a43f80ca..6be1a49a90 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -279,7 +279,11 @@ (define (environment-variables->setup-environment-script vars)
# ~/.profile does)
GUIX_PROFILE=\"$HOME_ENVIRONMENT/profile\"
PROFILE_FILE=\"$GUIX_PROFILE/etc/profile\"
-[ -f $PROFILE_FILE ] && . $PROFILE_FILE
+# Skip if already initialized.
+case $INFOPATH in
+ *$GUIX_PROFILE/share/info*) ;;
+ *) [ -f \"$PROFILE_FILE\" ] && . \"$PROFILE_FILE\" ;;
+esac
case $GUIX_LOCPATH in
*$GUIX_PROFILE/lib/locale*) ;;
diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index bab5730c3d..35c0c52a8e 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -88,7 +88,11 @@ (define (add-shell-profile-file config)
"shell-profile"
"\
HOME_ENVIRONMENT=$HOME/.guix-home
-. $HOME_ENVIRONMENT/setup-environment
+# Skip if already sourced.
+case $INFOPATH in
+ *$HOME_ENVIRONMENT/profile/share/info*) ;;
+ *) . \"$HOME_ENVIRONMENT/setup-environment\" ;;
+esac
$HOME_ENVIRONMENT/on-first-login
unset HOME_ENVIRONMENT\n"
(serialize-configuration
diff --git a/gnu/system.scm b/gnu/system.scm
index 46e6729e74..b67d26b648 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1148,6 +1148,11 @@ (define* (operating-system-etc-service os)
esac
done
+# Set up extra environment variables for Guix Home.
+HOME_ENVIRONMENT=\"$HOME/.guix-home\"
+[ -f \"$HOME_ENVIRONMENT/setup-environment\" ] && . \"$HOME_ENVIRONMENT/setup-environment\"
+unset HOME_ENVIRONMENT
+
# Prepend search paths not in a profile.
export PATH=/run/privileged/bin:$PATH
export XCURSOR_PATH=\"$HOME/.icons:$XCURSOR_PATH\"
--
2.49.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77526
; Package
guix-patches
.
(Sat, 19 Apr 2025 02:33:04 GMT)
Full text and
rfc822 format available.
Message #10 received at 77526 <at> debbugs.gnu.org (full text, mbox):
Hilton Chain <hako <at> ultrarare.space> writes:
> * gnu/system.scm (operating-system-etc-service)[profile]: Set up extra
> environment variables for Guix Home.
> * gnu/home/services/shells.scm (add-shell-profile-file): Skip
> setup-environment if already finished.
> * gnu/home/services.scm (environment-variables->setup-environment-script):
> Skip initializing home profile if already finished.
>
> Change-Id: Ife4100c6b19f61272525eebc82931c81784fe9e0
> ---
> gnu/home/services.scm | 6 +++++-
> gnu/home/services/shells.scm | 6 +++++-
> gnu/system.scm | 5 +++++
> 3 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/home/services.scm b/gnu/home/services.scm
> index 85a43f80ca..6be1a49a90 100644
> --- a/gnu/home/services.scm
> +++ b/gnu/home/services.scm
> @@ -279,7 +279,11 @@ (define (environment-variables->setup-environment-script vars)
> # ~/.profile does)
> GUIX_PROFILE=\"$HOME_ENVIRONMENT/profile\"
> PROFILE_FILE=\"$GUIX_PROFILE/etc/profile\"
> -[ -f $PROFILE_FILE ] && . $PROFILE_FILE
> +# Skip if already initialized.
> +case $INFOPATH in
> + *$GUIX_PROFILE/share/info*) ;;
> + *) [ -f \"$PROFILE_FILE\" ] && . \"$PROFILE_FILE\" ;;
> +esac
I don't think INFOPATH is a perfect flag, but I have no better idea
here..
So look good to me.
This bug report was last modified 57 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.