summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2026-02-24 14:53:38 +0200
committerEfraim Flashner <efraim@flashner.co.il>2026-02-24 15:14:45 +0200
commit14066302a6aba92da7f71153688de94829dfd3e4 (patch)
tree71091a50b727de2a4ceb22cca817e21b2979e2f5
parent3bc6949bb893da47fbde8c34cad4c2091b1fe450 (diff)
gnu: starship: Fix cross-compiling.
* gnu/packages/shellutils.scm (starship)[arguments]: Adjust a phase to only do shell substitution when the tests are run. Change-Id: I686ef0fb95628ccbfeec1f1b1534baec42317c40
-rw-r--r--gnu/packages/shellutils.scm19
1 files changed, 10 insertions, 9 deletions
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 35b6a91c0e6..5f42058ea7d 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -547,17 +547,18 @@ POSIX Shell}, @url{https://www.gnu.org/software/bash/, Bash}, and
("fish" . "share/fish/vendor_completions.d/starship.fish")
("nushell" . "share/nushell/vendor/autoload/starship")
("zsh" . "share/zsh/site-functions/_starship")))))
- ;; Some tests require a writable home directory
(add-after 'unpack 'patch-test-shell
- (lambda* (#:key inputs #:allow-other-keys)
- ;; search through the rust files and then replace `/bin/sh'
- ;; with the path to the `/bin/sh' in the drv inputs
+ (lambda* (#:key tests? inputs #:allow-other-keys)
+ ;; Search through the rust files and then replace `/bin/sh'
+ ;; with the full path for the tests.
(let ((rust-files (find-files "." "\\.rs$")))
- (for-each (lambda (file)
- (substitute* file
- (("/bin/sh")
- (search-input-file inputs "/bin/sh"))))
- rust-files))))
+ (when tests?
+ (for-each (lambda (file)
+ (substitute* file
+ (("/bin/sh")
+ (search-input-file inputs "/bin/sh"))))
+ rust-files)))))
+ ;; Some tests require a writable home directory
;; Set "HOME" to be located inside the cwd so it is writable
;; for tests checking for user-configs
(add-before 'check 'set-test-env-vars