guix-commits
[Top][All Lists]
Advanced

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

22/63: bootstrap: diffuils-mesboot: Scheme-only bootstrap.


From: guix-commits
Subject: 22/63: bootstrap: diffuils-mesboot: Scheme-only bootstrap.
Date: Sun, 24 Nov 2019 05:54:43 -0500 (EST)

janneke pushed a commit to branch wip-bootstrap
in repository guix.

commit 4df152c493d7f626f53d2ae41e1ba09599ec8736
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sun Sep 22 00:56:46 2019 +0200

    bootstrap: diffuils-mesboot: Scheme-only bootstrap.
    
    * gnu/packages/commencement.scm (diffutils-mesboot): Scheme-only bootstrap.
---
 gnu/packages/commencement.scm | 55 ++++++++++++++++++++++++++-----------------
 1 file changed, 33 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ba5d228..8ed2f87 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -756,22 +756,24 @@
     (inherit diffutils)
     (name "diffutils-mesboot")
     (version "2.7")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "mirror://gnu/diffutils/diffutils-"
-                                  version ".tar.gz"))
-              (sha256
-               (base32
-                "1mirn5i825bn5w7rh6mgn0r8aj9xqanav95dwcl1b8sn82f4iwnm"))))
+    (source (bootstrap-origin
+             (origin
+               (method url-fetch)
+               (uri (string-append "mirror://gnu/diffutils/diffutils-"
+                                   version ".tar.gz"))
+               (sha256
+                (base32
+                 "1mirn5i825bn5w7rh6mgn0r8aj9xqanav95dwcl1b8sn82f4iwnm")))))
     (supported-systems '("i686-linux" "x86_64-linux"))
     (inputs '())
     (propagated-inputs '())
-    (native-inputs `(("mes" ,mes-boot)
+    (native-inputs `(("gzip" ,gzip-mesboot0)
+                     ("make" ,make-mesboot0)
                      ("tcc" ,tcc-boot)
 
-                     ("bash" ,%bootstrap-coreutils&co)
-                     ("coreutils" ,%bootstrap-coreutils&co)
-                     ("make" ,make-mesboot0)))
+                     ("bash" ,%bootstrap-gash)
+                     ("gash" ,%bootstrap-gash)
+                     ("guile" ,%bootstrap-guile)))
     (arguments
      `(#:implicit-inputs? #f
        #:guile ,%bootstrap-guile
@@ -780,20 +782,29 @@
        #:strip-binaries? #f   ; no strip yet
        #:phases
        (modify-phases %standard-phases
-         ;; diffutils-2.7 needs more traditional configure
-         (replace 'configure
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((out (assoc-ref outputs "out"))
-                   (bash (assoc-ref %build-inputs "bash")))
-               (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
-               (setenv "CC" "tcc")
-               (setenv "LD" "tcc")
-               (invoke "./configure" (string-append "--prefix=" out)))))
          (add-before 'configure 'remove-diff3-sdiff
            (lambda* (#:key outputs #:allow-other-keys)
              (substitute* "Makefile.in"
-               (("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))
-             #t)))))))
+               (("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))))
+         (replace 'configure           ; needs classic invocation of configure
+           (lambda* (#:key configure-flags #:allow-other-keys)
+             (let* ((out (assoc-ref %outputs "out"))
+                    (bash (assoc-ref %build-inputs "bash"))
+                    (shell (string-append bash "/bin/bash")))
+               (setenv "CONFIG_SHELL" shell)
+               (setenv "CC" "tcc")
+               (setenv "LD" "tcc")
+               (format (current-error-port)
+                       "running ./configure ~a\n" (string-join 
configure-flags))
+               (apply invoke (cons "./configure" configure-flags)))))
+         (replace 'install
+           (lambda _
+             (let* ((out (assoc-ref %outputs "out"))
+                    (bin (string-append out "/bin")))
+               (mkdir-p bin)
+               (install-file "cmp" bin)
+               (install-file "diff" bin)
+               #t))))))))
 
 (define binutils-mesboot0
   (package



reply via email to

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