[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#33896: [PATCH 1/2] gnu: libblockdev: Embed executable paths.
From: |
Sarah Morgensen |
Subject: |
bug#33896: [PATCH 1/2] gnu: libblockdev: Embed executable paths. |
Date: |
Sat, 25 Sep 2021 14:28:01 -0700 |
Fixes <https://bugs.gnu.org/33896>.
* gnu/packages/disk.scm (libblockdev)[arguments]<#:phases>: Add
'patch-plugin-paths' phase.
---
gnu/packages/disk.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index 7d6f3811dd..f3a7eb7617 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -21,6 +21,7 @@
;;; Copyright © 2021 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2021 Mathieu Othacehe <othacehe@gnu.org>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -940,7 +941,13 @@ to create devices with respective mappings for the ATARAID
sets discovered.")
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* "src/lib/blockdev.c"
- (("/etc/libblockdev/conf.d/" path) (string-append out
path)))))))))
+ (("/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)))))))))
(native-inputs
`(("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config)
base-commit: 69f37702dfcda776a190d5c40fad8518469ce3c4
--
2.33.0
- bug#33896: [PATCH 1/2] gnu: libblockdev: Embed executable paths.,
Sarah Morgensen <=