all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hilton Chain via Guix-patches via <guix-patches@gnu.org>
To: 61057@debbugs.gnu.org
Cc: Hilton Chain <hako@ultrarare.space>
Subject: [bug#61057] [PATCH v2 2/2] gnu: flashrom: Wrap PATH to find dmidecode.
Date: Mon, 29 May 2023 00:53:58 +0800	[thread overview]
Message-ID: <20230528165358.13530-2-hako@ultrarare.space> (raw)
In-Reply-To: <20230528165358.13530-1-hako@ultrarare.space>

* gnu/packages/flashing-tools.scm (flashrom)[inputs]: Add bash-minimal.
[arguments]<#:phases>: Add phase 'wrap-program.
---
 gnu/packages/flashing-tools.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/flashing-tools.scm b/gnu/packages/flashing-tools.scm
index a1631b2940..19219a6d7e 100644
--- a/gnu/packages/flashing-tools.scm
+++ b/gnu/packages/flashing-tools.scm
@@ -41,6 +41,7 @@ (define-module (gnu packages flashing-tools)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
@@ -72,11 +73,20 @@ (define-public flashrom
                (base32
                 "08wn2j5vxzzvigflrjypgxxzjp32c76bshrlkzki5l6cad226lx0"))))
     (build-system meson-build-system)
-    (inputs (list dmidecode pciutils libusb libftdi libjaylink))
+    (inputs (list bash-minimal dmidecode pciutils libusb libftdi libjaylink))
     (native-inputs (list cmocka pkg-config))
     (arguments
      (list #:configure-flags
-           #~'("-Dprogrammer=all")))
+           #~'("-Dprogrammer=all")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'install 'wrap-program
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (let ((flashrom (string-append #$output "/sbin/flashrom")))
+                     (wrap-program flashrom
+                       `("PATH" ":" prefix
+                         (,(dirname (search-input-file
+                                     inputs "/sbin/dmidecode")))))))))))
     (home-page "https://flashrom.org/")
     (synopsis "Identify, read, write, erase, and verify ROM/flash chips")
     (description
-- 
2.40.1





  reply	other threads:[~2023-05-28 16:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25 12:02 [bug#61057] [PATCH 0/3] gnu: flashrom: Update to 1.2.1 Hilton Chain via Guix-patches via
2023-01-25 12:04 ` [bug#61057] [PATCH 1/3] " Hilton Chain via Guix-patches via
2023-01-25 12:05   ` [bug#61057] [PATCH 2/3] gnu: flashrom: Use G-Expressions Hilton Chain via Guix-patches via
2023-01-25 12:06     ` [bug#61057] [PATCH 3/3] gnu: flashrom: Wrap PATH to find dmidecode Hilton Chain via Guix-patches via
2023-05-28 16:51 ` [bug#61057] [PATCH v2 0/2] gnu: flashrom: Update to 1.3.0 Hilton Chain via Guix-patches via
2023-05-28 16:53   ` [bug#61057] [PATCH v2 1/2] " Hilton Chain via Guix-patches via
2023-05-28 16:53     ` Hilton Chain via Guix-patches via [this message]
2023-06-08 21:19   ` bug#61057: [PATCH 0/3] gnu: flashrom: Update to 1.2.1 Ludovic Courtès

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=20230528165358.13530-2-hako@ultrarare.space \
    --to=guix-patches@gnu.org \
    --cc=61057@debbugs.gnu.org \
    --cc=hako@ultrarare.space \
    /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.