GNU bug report logs - #54615
[PATCH 0/2] Add riscv-pk and improve spike

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Mon, 28 Mar 2022 18:42:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 54615 <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>, Efraim Flashner <efraim <at> flashner.co.il>
Subject: [bug#54615] [PATCH v2 1/2] gnu: spike: Substitute path to dtc instead of wrapping executables.
Date: Tue, 29 Mar 2022 00:25:56 +0530
* gnu/packages/virtualization.scm (spike)[arguments]: Delete the wrap-binary
phase. Add a configure-dtc-path phase that substitutes the absolute path to
dtc.
---
 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..9c86670ce7 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -26,6 +26,7 @@
 ;;; Copyright © 2021 Raghav Gururajan <rg <at> raghavgururajan.name>
 ;;; Copyright © 2022 Oleg Pykhalov <go.wigust <at> gmail.com>
 ;;; Copyright © 2022 Ekaitz Zarraga <ekaitz <at> elenq.tech>
+;;; Copyright © 2022 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1037,15 +1038,12 @@ (define-public spike
      (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 "\"" (assoc-ref inputs "dtc") "/bin/dtc\""))))))))
     (inputs
      (list bash-minimal dtc))
     (native-inputs
-- 
2.34.0





This bug report was last modified 3 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.