Subject: [bug#58448] [PATCH] gnu: helm: fix not finding Factory Presets

From: Sughosha <[email-masked]>
Date: Tue, 11 Oct 2022 18:34:21 +0000

* gnu/packages/music.scm (helm): Fix not finding Factory Presets.
  This change fixes hardcoded paths so that Factory Presets can be found.
---
 gnu/packages/music.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 6b37c79389..000b372303 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -6144,6 +6144,13 @@ (define-public helm
              (substitute* "Makefile"
                (("/usr") ""))
              #t))
+         (add-after 'unpack 'fix-hardcoded-paths
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "src/common/load_save.cpp"
+               (("/usr") (assoc-ref outputs "out")))
+             (substitute* "src/editor_sections/patch_browser.cpp"
+               (("/usr") (assoc-ref outputs "out")))
+             #t))
          (delete 'configure))))
     (inputs
      `(("alsa-lib" ,alsa-lib)
-- 
2.38.0