gnu: %guile-static-stripped: Rewrite in terms of 'make-guile-static-stripped'.

The derivation changes slightly, but the end result is bit-identical.

* gnu/packages/make-bootstrap.scm (make-guile-static-stripped): New procedure.
(%guile-static-stripped): Adjust accordingly.
This commit is contained in:
Marius Bakke 2020-04-27 19:47:23 +02:00
parent db7c73f53a
commit e66bbd4201
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -745,30 +745,30 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
"guile-default-utf8.patch" "guile-default-utf8.patch"
"guile-linux-syscalls.patch"))) "guile-linux-syscalls.patch")))
(define %guile-static-stripped (define* (make-guile-static-stripped static-guile)
;; A stripped static Guile binary, for use during bootstrap. (package
(package (inherit %guile-static) (inherit static-guile)
(name "guile-static-stripped") (name (string-append (package-name static-guile) "-stripped"))
(build-system trivial-build-system) (build-system trivial-build-system)
(arguments (arguments
;; The end result should depend on nothing but itself. ;; The end result should depend on nothing but itself.
`(#:allowed-references ("out") `(#:allowed-references ("out")
#:modules ((guix build utils)) #:modules ((guix build utils))
#:builder #:builder
(let () (let ((version ,(version-major+minor (package-version static-guile))))
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((in (assoc-ref %build-inputs "guile")) (let* ((in (assoc-ref %build-inputs "guile"))
(out (assoc-ref %outputs "out")) (out (assoc-ref %outputs "out"))
(guile1 (string-append in "/bin/guile")) (guile1 (string-append in "/bin/guile"))
(guile2 (string-append out "/bin/guile"))) (guile2 (string-append out "/bin/guile")))
(mkdir-p (string-append out "/share/guile/2.0")) (mkdir-p (string-append out "/share/guile/" version))
(copy-recursively (string-append in "/share/guile/2.0") (copy-recursively (string-append in "/share/guile/" version)
(string-append out "/share/guile/2.0")) (string-append out "/share/guile/" version))
(mkdir-p (string-append out "/lib/guile/2.0/ccache")) (mkdir-p (string-append out "/lib/guile/" version "/ccache"))
(copy-recursively (string-append in "/lib/guile/2.0/ccache") (copy-recursively (string-append in "/lib/guile/" version "/ccache")
(string-append out "/lib/guile/2.0/ccache")) (string-append out "/lib/guile/" version "/ccache"))
(mkdir (string-append out "/bin")) (mkdir (string-append out "/bin"))
(copy-file guile1 guile2) (copy-file guile1 guile2)
@ -789,10 +789,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
'((invoke guile2 "--version"))) '((invoke guile2 "--version")))
#t)))) #t))))
(inputs `(("guile" ,%guile-static))) (inputs `(("guile" ,static-guile)))
(outputs '("out")) (outputs '("out"))
(synopsis "Minimal statically-linked and relocatable Guile"))) (synopsis "Minimal statically-linked and relocatable Guile")))
(define %guile-static-stripped
;; A stripped static Guile binary, for use during bootstrap.
(make-guile-static-stripped %guile-static))
(define (tarball-package pkg) (define (tarball-package pkg)
"Return a package containing a tarball of PKG." "Return a package containing a tarball of PKG."
(package (inherit pkg) (package (inherit pkg)