~ruther/guix-local

57e8e8c91624546a1d73e436fb831c662fb37fbd — Tobias Geerinckx-Rice 5 years ago 76b689f
gnu: zstd: Fix unnecessary dependency upon $PATH.

* gnu/packages/compression (zstd)[arguments]:
Add a 'patch-command-file-names phase.
1 files changed, 13 insertions(+), 0 deletions(-)

M gnu/packages/compression.scm
M gnu/packages/compression.scm => gnu/packages/compression.scm +13 -0
@@ 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)