bootstrap: Merge mes-minimal into mes-minimal-stripped.

* gnu/packages/make-bootstrap.scm (%mes-minimal): Remove.
(%mes-minimal-stripped): Configure using --mes.  Strip installation.
This commit is contained in:
Jan Nieuwenhuizen 2018-12-15 09:01:53 +01:00
parent c994177155
commit 20dd94b82f
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 13 additions and 37 deletions

View File

@ -548,55 +548,31 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
((#:make-flags flags) ((#:make-flags flags)
`(cons "CC=gcc -static" ,flags))))))) `(cons "CC=gcc -static" ,flags)))))))
(define %mes-minimal (define-public %mes-minimal-stripped
;; A minimal Mes without documentation dependencies, for bootstrap. ;; A minimal Mes without documentation dependencies, for bootstrap.
(let ((triplet "i686-unknown-linux-gnu")) (let ((triplet "i686-unknown-linux-gnu"))
(package (package
(inherit mes) (inherit mes)
(name "mes-minimal") (name "mes-minimal-stripped")
(native-inputs (native-inputs
`(("guile" ,guile-2.2))) `(("guile" ,guile-2.2)))
(arguments (arguments
`(#:system "i686-linux" `(#:system "i686-linux"
#:strip-binaries? #f #:strip-binaries? #f
#:configure-flags '("--mes")
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'configure 'optional-dot (add-after 'install 'strip-install
(lambda _ (lambda _
(substitute* "configure"
(("#:version-option \"-V\"" all)
(string-append all "#:optional? #t")))))))))))
(define-public %mes-minimal-stripped
;; The subset of Mes files needed for bootstrap.
(package
(inherit %mes-minimal)
(name "mes-minimal-stripped")
(build-system trivial-build-system)
(source #f)
(arguments
`(#:modules ((guix build utils))
#:builder
(begin
(use-modules (srfi srfi-1)
(srfi srfi-26)
(guix build utils))
(setvbuf (current-output-port) _IOLBF)
(let* ((out (assoc-ref %outputs "out")) (let* ((out (assoc-ref %outputs "out"))
(bindir (string-append out "/bin")) (share (string-append out "/share")))
(libdir (string-append out "/lib")) (delete-file-recursively (string-append out "/lib/guile"))
(mes (assoc-ref %build-inputs "mes"))) (delete-file-recursively (string-append share "/guile"))
(delete-file-recursively (string-append share "/mes/scaffold"))
(copy-recursively (string-append mes "/bin") bindir) (for-each
(copy-recursively (string-append mes "/lib") libdir) delete-file
(copy-recursively (string-append mes "/share/mes/lib") libdir) (find-files (string-append share "/mes/lib")
(for-each remove-store-references "\\.(h|c)")))))))))))
(remove (lambda (file) (or (string-suffix? ".h" file)
(string-suffix? ".c" file)))
(find-files out ".*")))
#t))))
(inputs `(("mes" ,%mes-minimal)))))
(define %guile-static (define %guile-static
;; A statically-linked Guile that is relocatable--i.e., it can search ;; A statically-linked Guile that is relocatable--i.e., it can search