guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 1fa06cd064714d1f6d9b1e185980c0312b067966
Author: Hilton Chain <[email protected]>
AuthorDate: Tue Feb 17 20:26:15 2026 +0800
gnu: fish: Patch __fish_build_paths.fish before building.
Since fish 4.2.0, this file is embeded into fish binary during the build
process. The one installed into the ‘share’ directory is no longer used.
* gnu/packages/shells.scm (fish) [arguments] <#:phases>: Start
patch-fish-extra-paths and source-etc-profile before the build phase.
Fixes: #6474
Change-Id: I9f3f92351f50c5656151606b8c483ce007076534
Merges: #6497
---
gnu/packages/shells.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 4620dccd8f..3dffcc2d49 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -254,9 +254,9 @@ direct descendant of NetBSD's Almquist Shell
(@command{ash}).")
(close-port port))))
;; Enable completions, functions and configurations in user's and
;; system's guix profiles by adding them to __extra_* variables.
- (add-before 'install 'patch-fish-extra-paths
+ (add-before 'build 'patch-fish-extra-paths
(lambda _
- (let ((port (open-file "share/__fish_build_paths.fish" "a")))
+ (let ((port (open-file "share/__fish_build_paths.fish.in" "a")))
(display
(string-append
"\n\n"
@@ -285,9 +285,9 @@ direct descendant of NetBSD's Almquist Shell
(@command{ash}).")
(apply (assoc-ref gnu:%standard-phases 'check)
#:test-target "fish_run_tests" args)))
;; Use fish-foreign-env to source /etc/profile.
- (add-before 'install 'source-etc-profile
+ (add-before 'build 'source-etc-profile
(lambda* (#:key inputs #:allow-other-keys)
- (let ((port (open-file "share/__fish_build_paths.fish" "a")))
+ (let ((port (open-file "share/__fish_build_paths.fish.in" "a")))
(display
(string-append
"\n\n"
@@ -298,7 +298,7 @@ direct descendant of NetBSD's Almquist Shell
(@command{ash}).")
(dirname
(search-input-file inputs "share/fish/functions/fenv.fish"))
" $__fish_datadir/functions\n"
- " fenv source /etc/profile\n"
+ " [ -f /etc/profile ] && fenv source /etc/profile\n"
" set -e fish_function_path\n"
"end\n")
port)