summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim@guixotic.coop>2025-08-08 14:05:40 +0900
committerMaxim Cournoyer <maxim@guixotic.coop>2025-11-19 09:42:13 +0900
commitbb81a40b22d53a9c8b4bae32fabd571bb38f980a (patch)
treeb0eee83e3e26f75806b6741a33c83616831521da
parentaeb3e89699c27231bb98ad5c03e0a7f4be6b5f78 (diff)
Revert "utils: Set $0 to basename of command in `wrap-program'."
This reverts commit df94888eca214c496b5cdf57795e03b96866c3af. This was working around a problem in cling, which should be addressed in cling -- the wrapper should be as transparent as possible. Fixes: #1674 Change-Id: Ib4e5d62c5eb65c92ece8a99a10979a1f0173d49c
-rw-r--r--guix/build/utils.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 7003d8262fc..94714bf3973 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1355,7 +1355,7 @@ contents:
1355 #!location/of/bin/bash 1355 #!location/of/bin/bash
1356 export PATH=\"/gnu/.../bar/bin\" 1356 export PATH=\"/gnu/.../bar/bin\"
1357 export CERT_PATH=\"$CERT_PATH${CERT_PATH:+:}/gnu/.../baz/certs:/qux/certs\" 1357 export CERT_PATH=\"$CERT_PATH${CERT_PATH:+:}/gnu/.../baz/certs:/qux/certs\"
1358 exec -a \"${0##*/}\" location/of/.foo-real \"$@\" 1358 exec -a $0 location/of/.foo-real \"$@\"
1359 1359
1360This is useful for scripts that expect particular programs to be in $PATH, for 1360This is useful for scripts that expect particular programs to be in $PATH, for
1361programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or 1361programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or
@@ -1432,7 +1432,7 @@ with definitions for VARS. If it is not, SH will be used as interpreter."
1432 (call-with-output-file prog-tmp 1432 (call-with-output-file prog-tmp
1433 (lambda (port) 1433 (lambda (port)
1434 (format port 1434 (format port
1435 "#!~a~%~a~%exec -a \"${0##*/}\" \"~a\" \"$@\"~%" 1435 "#!~a~%~a~%exec -a \"$0\" \"~a\" \"$@\"~%"
1436 sh 1436 sh
1437 (string-join (map export-variable vars/filtered) "\n") 1437 (string-join (map export-variable vars/filtered) "\n")
1438 (canonicalize-path wrapped-file)))) 1438 (canonicalize-path wrapped-file))))