guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch core-updates updated: gnu: zstd: Fix unnecessary dependency upon


From: guix-commits
Subject: branch core-updates updated: gnu: zstd: Fix unnecessary dependency upon $PATH.
Date: Sat, 27 Mar 2021 08:48:26 -0400

This is an automated email from the git hooks/post-receive script.

nckx pushed a commit to branch core-updates
in repository guix.

The following commit(s) were added to refs/heads/core-updates by this push:
     new 57e8e8c  gnu: zstd: Fix unnecessary dependency upon $PATH.
57e8e8c is described below

commit 57e8e8c91624546a1d73e436fb831c662fb37fbd
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sat Mar 27 13:11:00 2021 +0100

    gnu: zstd: Fix unnecessary dependency upon $PATH.
    
    * gnu/packages/compression (zstd)[arguments]:
    Add a 'patch-command-file-names phase.
---
 gnu/packages/compression.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index ddebc55..1a41e5a 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -1423,6 +1423,19 @@ or junctions, and always follows hard links.")
                (("error configured .*dir ")
                 "true "))
              #t))
+         (add-after 'unpack 'patch-command-file-names
+           ;; Don't require hard requirements to be in $PATH.
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (our (lambda (name) (string-append out "/bin/" name))))
+               (substitute* "programs/zstdgrep"
+                 (("(:-)(grep)" _ prefix command)
+                  (string-append prefix (which command)))
+                 (("(:-)(zstdcat)" _ prefix command)
+                  (string-append prefix (our command))))
+               (substitute* "programs/zstdless"
+                 (("zstdcat" command)
+                  (our command))))))
          (delete 'configure)            ;no configure script
          (add-after 'install 'adjust-library-locations
            (lambda* (#:key outputs #:allow-other-keys)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]