From 63641be6ebb33dc2d1d034a71b435c74bec178d8 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 23 Mar 2022 08:32:44 +0200 Subject: [PATCH] gnu: spike: Wrap binaries. * gnu/packages/virtualization.scm (spike)[arguments]: Add phase to wrap binaries with dtc. [inputs]: Add bash-minimal. --- gnu/packages/virtualization.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 5edb23b3d2..5909691347 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -1033,8 +1033,21 @@ (define-public spike (sha256 (base32 "0cik2m0byfp9ppq0hpg3xyrlp5ag1i4dww7a7872mlm36xxqagg0")))) (build-system gnu-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-binary + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each + (lambda (file) + (wrap-program file + `("PATH" ":" prefix + (,(dirname (search-input-file inputs "/bin/dtc")))))) + (find-files (string-append out "/bin"))))))))) (inputs - (list dtc)) + (list bash-minimal dtc)) (native-inputs (list python-wrapper)) (home-page "https://github.com/riscv-software-src/riscv-isa-sim")