all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 71327@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: [bug#71327] [PATCH 5/8] gnu: libblockdev: Use gexps.
Date: Mon,  3 Jun 2024 08:02:53 -0400	[thread overview]
Message-ID: <0980caab2c95ff572b945bba1a223d2d9a59d210.1717382584.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <1b493965d8ba0a4dc3c06fa813314c4ffa551b3c.1717382583.git.maxim.cournoyer@gmail.com>

* gnu/packages/disk.scm (libblockdev)
[phases]: Use gexps.
{patch-plugin-paths}: Use search-input-file.

Change-Id: I61f9b3dfdd4dc249fb0f59abb99826a8e759bb42
---
 gnu/packages/disk.scm | 31 +++++++++++++++++++------------
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 7fbd6a52d7..1cdeb53597 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -1192,19 +1192,26 @@ (define-public libblockdev
                 "1ny2glwmb5dcdv2x0giinbyma9fhk59z8117k1kr15pm7yjk7jx5"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-configuration-directory
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out")))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-configuration-directory
+            (lambda _
               (substitute* "src/lib/blockdev.c"
-                (("/etc/libblockdev/conf.d/" path) (string-append out path))))))
-         (add-after 'unpack 'patch-plugin-paths
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* (find-files "src/plugins" "\\.c$")
-               (("(gchar \\*arg.+\\{\")([^\"]+)" all start program)
-                ;; XXX: Use 'search-input-file' when available.
-                (string-append start (or (which program) program)))))))))
+                (("/etc/libblockdev/conf.d/" path)
+                 (string-append #$output path)))))
+          (add-after 'unpack 'patch-plugin-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* (find-files "src/plugins" "\\.c$")
+                (("(gchar \\*arg.+\\{\")([^\"]+)" all start program)
+                 (string-append
+                  start (or (false-if-exception
+                             (search-input-file inputs
+                                                (string-append "bin/" program)))
+                            (false-if-exception
+                             (search-input-file inputs
+                                                (string-append "sbin/" program)))
+                            program)))))))))
     (native-inputs
      (list gobject-introspection
            pkg-config
-- 
2.45.1





  parent reply	other threads:[~2024-06-03 12:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03  2:43 [bug#71327] [PATCH 1/8] gnu: libbytesize: Update to 2.10 Maxim Cournoyer
2024-06-03 12:02 ` [bug#71327] [PATCH 2/8] gnu: libblockdev: Embed executable paths Maxim Cournoyer
2024-06-03 12:02 ` [bug#71327] [PATCH 3/8] gnu: libblockdev: Fix inputs Maxim Cournoyer
2024-06-03 12:02 ` [bug#71327] [PATCH 4/8] gnu: libblockdev: Update to 3.1.1 Maxim Cournoyer
2024-06-03 12:02 ` Maxim Cournoyer [this message]
2024-06-03 12:02 ` [bug#71327] [PATCH 6/8] gnu: udisks: Remove input labels Maxim Cournoyer
2024-06-03 12:02 ` [bug#71327] [PATCH 7/8] gnu: udisks: Update to 2.10.1 Maxim Cournoyer
2024-06-03 12:02 ` [bug#71327] [PATCH 8/8] gnu: udisks: Remove obsolete wrap-udisksd phase Maxim Cournoyer

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=0980caab2c95ff572b945bba1a223d2d9a59d210.1717382584.git.maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=71327@debbugs.gnu.org \
    /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.