summary refs log tree commit diff
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2019-11-22 20:32:10 +0100
committerJan Nieuwenhuizen <janneke@gnu.org>2020-02-17 23:16:42 +0100
commitfa638c18b61db9b9340c35f54f8438d6fabe352b (patch)
tree4dbe18cf1700c3f9c7446de66e1cb2ef8cbd0e08
parent125d7c587199f10b184aef102ed3eabedf0d4382 (diff)
downloadguix-fa638c18b61db9b9340c35f54f8438d6fabe352b.tar.gz
gnu: commencement: Add grep-mesboot.
* gnu/packages/commencement.scm (grep-mesboot): New variable.
-rw-r--r--gnu/packages/commencement.scm38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 6cf7b0a368..4633051fc7 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1693,6 +1693,44 @@ ac_cv_c_float_format='IEEE (little-endian)'
                (install-file "src/tar" bin)
                #t))))))))
 
+(define grep-mesboot
+  ;; The initial grep.
+  (package
+    (inherit grep)
+    (name "grep-mesboot")
+    (version "2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/grep/grep-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1w862l80lgc5mxvpiy4cfwk761d6xxavn0m3xd2l7xs2kmzvp6lq"))))
+    (supported-systems '("i686-linux" "x86_64-linux"))
+    (inputs '())
+    (propagated-inputs '())
+    (native-inputs (%boot-mesboot0-inputs))
+    (arguments
+     `(#:implicit-inputs? #f
+       #:guile ,%bootstrap-guile
+       #:parallel-build? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-configure
+           (lambda _
+             (let* ((bash (assoc-ref %build-inputs "bash"))
+                    (shell (string-append bash "/bin/bash")))
+               (substitute* "configure"
+                 ((" [|][|] ./config.status") " || sh ./config.status")))))
+         (replace 'install
+           (lambda _
+             (let* ((out (assoc-ref %outputs "out"))
+                    (bin (string-append out "/bin")))
+               (install-file "grep" bin)
+               (symlink "grep" (string-append bin "/egrep"))
+               (symlink "grep" (string-append bin "/fgrep"))
+               #t))))))))
+
 (define binutils-mesboot
   (package
     (inherit binutils-mesboot0)