Subject: bug#57008: closed (Re: bug#57008: [PATCH] gnu: perf-tools: Patch executable paths)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 31 Aug 2022 21:06:02 +0000

Your bug report

#57008: [PATCH] gnu: perf-tools: Patch executable paths

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
57008: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57008
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#57008: [PATCH] gnu: perf-tools: Patch executable paths
From: Ludovic Courtès <[email-masked]>
To: Olivier Dion <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Wed, 31 Aug 2022 23:05:36 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Olivier & Mathieu,

Olivier Dion <[email-masked]> skribis:

> * gnu/packages/instrumentation.scm (perf-tools): Add patch phase.
> [phases]: Add patch-paths.

[...]

> +             (substitute* '("execsnoop" "killsnoop" "kernel/funcslower")
> +               (("/usr/bin/gawk") (which "awk")))
> +             (substitute* '"execsnoop"
> +               (("/usr/bin/getconf") (which "getconf"))))))

I went ahead and applied a modified version of this patch that uses
‘search-input-file’ instead of ‘which’.

Thanks,
Ludo’.

Subject: [PATCH] gnu: perf-tools: Patch executable paths
From: Olivier Dion <[email-masked]>
To: [email-masked]
Cc: Olivier Dion <[email-masked]>, [email-masked]
Date: Fri, 5 Aug 2022 11:49:26 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/instrumentation.scm (perf-tools): Add patch phase.
[phases]: Add patch-paths.
---
 gnu/packages/instrumentation.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index f52cf11505..95724f976b 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -308,7 +308,15 @@ (define-public perf-tools
                (base32 "1ab735idi0h62yvhzd7822jj3555vygixv4xjrfrdvi8d2hhz6qn"))))
     (build-system copy-build-system)
     (arguments
-     `(#:install-plan
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-paths
+           (lambda _
+             (substitute* '("execsnoop" "killsnoop" "kernel/funcslower")
+               (("/usr/bin/gawk") (which "awk")))
+             (substitute* '"execsnoop"
+               (("/usr/bin/getconf") (which "getconf"))))))
+       #:install-plan
        ',(append
           (map (cut list <> "bin/")
                '("disk/bitesize"
-- 
2.37.1