guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: spike: Substitute path to dtc instead of wrapping executable


From: guix-commits
Subject: 01/02: gnu: spike: Substitute path to dtc instead of wrapping executables.
Date: Thu, 31 Mar 2022 08:30:45 -0400 (EDT)

efraim pushed a commit to branch master
in repository guix.

commit 9afad0c16ee4074af30fcf6afeafd5243bdab886
Author: Arun Isaac <arunisaac@systemreboot.net>
AuthorDate: Tue Mar 29 16:13:02 2022 +0530

    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>
---
 gnu/packages/virtualization.scm | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index bd297977df..4c0f02154c 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -26,6 +26,7 @@
 ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
 ;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech>
+;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1037,15 +1038,12 @@ Debian or a derivative using @command{debootstrap}.")
      (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")))))))))
+           (add-before 'configure 'configure-dtc-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               ;; Reference dtc by its absolute store path.
+               (substitute* "riscv/dts.cc"
+                 (("DTC")
+                  (string-append "\"" (search-input-file inputs "/bin/dtc") 
"\""))))))))
     (inputs
      (list bash-minimal dtc))
     (native-inputs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]