gnu: zstd: Fix unnecessary dependency upon $PATH.
* gnu/packages/compression (zstd)[arguments]: Add a 'patch-command-file-names phase.
This commit is contained in:
		
							parent
							
								
									76b689f339
								
							
						
					
					
						commit
						57e8e8c916
					
				
					 1 changed files with 13 additions and 0 deletions
				
			
		|  | @ -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) | ||||
|  |  | |||
		Reference in a new issue