all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: 54615@debbugs.gnu.org
Cc: Arun Isaac <arunisaac@systemreboot.net>,
	Efraim Flashner <efraim@flashner.co.il>
Subject: [bug#54615] [PATCH 1/2] gnu: spike: Substitute path to dtc instead of wrapping executables.
Date: Tue, 29 Mar 2022 00:13:18 +0530	[thread overview]
Message-ID: <20220328184319.25281-1-arunisaac@systemreboot.net> (raw)
In-Reply-To: <20220328184117.25158-1-arunisaac@systemreboot.net>

* 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@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 @@ (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





  reply	other threads:[~2022-03-28 18:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 18:41 [bug#54615] [PATCH 0/2] Add riscv-pk and improve spike Arun Isaac
2022-03-28 18:43 ` Arun Isaac [this message]
2022-03-28 18:43   ` [bug#54615] [PATCH 2/2] gnu: Add riscv-pk Arun Isaac
2022-03-28 18:55 ` [bug#54615] [PATCH v2 0/2] Add riscv-pk and improve spike Arun Isaac
2022-03-28 18:55   ` [bug#54615] [PATCH v2 1/2] gnu: spike: Substitute path to dtc instead of wrapping executables Arun Isaac
2022-03-28 19:49     ` Maxime Devos
2022-03-29 10:42       ` Arun Isaac
2022-03-29 10:43       ` [bug#54615] [PATCH v3 " Arun Isaac
2022-03-29 10:43       ` [bug#54615] [PATCH v3 2/2] gnu: Add riscv-pk Arun Isaac
2022-03-31 12:30         ` bug#54615: " Efraim Flashner
2022-04-01  6:32           ` [bug#54615] " Arun Isaac
2022-03-28 18:55   ` [bug#54615] [PATCH v2 " Arun Isaac
2022-03-28 19:24     ` Maxime Devos
2022-03-28 20:10   ` [bug#54615] [PATCH v2 0/2] Add riscv-pk and improve spike Efraim Flashner
2022-03-29 10:39     ` Arun Isaac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220328184319.25281-1-arunisaac@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=54615@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.