summaryrefslogtreecommitdiff
path: root/gnu/packages/shellutils.scm
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 /gnu/packages/shellutils.scm
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
Diffstat (limited to 'gnu/packages/shellutils.scm')
-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
547 ("fish" . "share/fish/vendor_completions.d/starship.fish") 547 ("fish" . "share/fish/vendor_completions.d/starship.fish")
548 ("nushell" . "share/nushell/vendor/autoload/starship") 548 ("nushell" . "share/nushell/vendor/autoload/starship")
549 ("zsh" . "share/zsh/site-functions/_starship"))))) 549 ("zsh" . "share/zsh/site-functions/_starship")))))
550 ;; Some tests require a writable home directory
551 (add-after 'unpack 'patch-test-shell 550 (add-after 'unpack 'patch-test-shell
552 (lambda* (#:key inputs #:allow-other-keys) 551 (lambda* (#:key tests? inputs #:allow-other-keys)
553 ;; search through the rust files and then replace `/bin/sh' 552 ;; Search through the rust files and then replace `/bin/sh'
554 ;; with the path to the `/bin/sh' in the drv inputs 553 ;; with the full path for the tests.
555 (let ((rust-files (find-files "." "\\.rs$"))) 554 (let ((rust-files (find-files "." "\\.rs$")))
556 (for-each (lambda (file) 555 (when tests?
557 (substitute* file 556 (for-each (lambda (file)
558 (("/bin/sh") 557 (substitute* file
559 (search-input-file inputs "/bin/sh")))) 558 (("/bin/sh")
560 rust-files)))) 559 (search-input-file inputs "/bin/sh"))))
560 rust-files)))))
561 ;; Some tests require a writable home directory
561 ;; Set "HOME" to be located inside the cwd so it is writable 562 ;; Set "HOME" to be located inside the cwd so it is writable
562 ;; for tests checking for user-configs 563 ;; for tests checking for user-configs
563 (add-before 'check 'set-test-env-vars 564 (add-before 'check 'set-test-env-vars