mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work regardless of $PATH.
This is the bootstrap version of 1063d325ea
* gnu/packages/bootstrap.scm (%bootstrap-coreutils&co)[source]: Patch
the absolute location of 'grep' when called from 'egrep' or 'fgrep'.
This commit is contained in:
parent
d15432ca9e
commit
653add37af
1 changed files with 8 additions and 0 deletions
|
@ -28,6 +28,7 @@ (define-module (gnu packages bootstrap)
|
|||
#:use-module ((guix store) #:select (add-to-store add-text-to-store))
|
||||
#:use-module ((guix derivations) #:select (derivation))
|
||||
#:use-module ((guix utils) #:select (gnu-triplet->nix-system))
|
||||
#:use-module ((guix build utils) #:select (elf-file?))
|
||||
#:use-module (guix memoization)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-26)
|
||||
|
@ -325,6 +326,13 @@ (define %bootstrap-coreutils&co
|
|||
(chmod "bin" #o755)
|
||||
(patch-shebang "bin/egrep" path)
|
||||
(patch-shebang "bin/fgrep" path)
|
||||
;; Starting with grep@2.25 'egrep' and 'fgrep' are shell files
|
||||
;; that call 'grep'. If the bootstrap 'egrep' and 'fgrep'
|
||||
;; are not binaries then patch them to execute 'grep' via its
|
||||
;; absolute file name instead of searching for it in $PATH.
|
||||
(if (not (elf-file? "bin/egrep"))
|
||||
(substitute* '("bin/egrep" "bin/fgrep")
|
||||
(("^exec grep") (string-append (getcwd) "/bin/grep"))))
|
||||
(chmod "bin" #o555)
|
||||
#t)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue