gnu: spike: Substitute path to dtc instead of wrapping executables.
* gnu/packages/virtualization.scm (spike)[arguments]: Delete the wrap-binary phase. Add a configure-dtc-path phase that substitutes the absolute path to dtc. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>master
parent
dda555fead
commit
9afad0c16e
|
@ -26,6 +26,7 @@
|
||||||
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
|
;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
|
||||||
;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
|
;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
|
||||||
;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
|
;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
|
||||||
|
;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -1037,15 +1038,12 @@ Debian or a derivative using @command{debootstrap}.")
|
||||||
(list
|
(list
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'install 'wrap-binary
|
(add-before 'configure 'configure-dtc-path
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
;; Reference dtc by its absolute store path.
|
||||||
(for-each
|
(substitute* "riscv/dts.cc"
|
||||||
(lambda (file)
|
(("DTC")
|
||||||
(wrap-program file
|
(string-append "\"" (search-input-file inputs "/bin/dtc") "\""))))))))
|
||||||
`("PATH" ":" prefix
|
|
||||||
(,(dirname (search-input-file inputs "/bin/dtc"))))))
|
|
||||||
(find-files (string-append out "/bin")))))))))
|
|
||||||
(inputs
|
(inputs
|
||||||
(list bash-minimal dtc))
|
(list bash-minimal dtc))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
|
|
Reference in New Issue