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 <m...@rohleder.de>
 ;;; Copyright © 2021 Mathieu Othacehe <othac...@gnu.org>
 ;;; Copyright © 2021 Brice Waegeneire <br...@waegenei.re>
+;;; Copyright © 2021 Sarah Morgensen <iskar...@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




Reply via email to