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

The derivation remains unchanged.

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

View File

@ -676,34 +676,31 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
#t))))
(inputs `(("mes" ,%mes-minimal)))))
(define %guile-static
;; A statically-linked Guile that is relocatable--i.e., it can search
;; .scm and .go files relative to its installation directory, rather
;; than in hard-coded configure-time paths.
(let* ((patches (cons* (search-patch "guile-relocatable.patch")
(search-patch "guile-default-utf8.patch")
(search-patch "guile-linux-syscalls.patch")
(origin-patches (package-source guile-2.0))))
(source (origin (inherit (package-source guile-2.0))
(patches patches)))
(guile (package (inherit guile-2.0)
(name (string-append (package-name guile-2.0) "-static"))
(source source)
(define* (make-guile-static guile patches)
(package-with-relocatable-glibc
(static-package
(package
(inherit guile)
(source
(origin (inherit (package-source guile))
(patches (append (map search-patch patches)
(origin-patches (package-source guile))))))
(name (string-append (package-name guile) "-static"))
(synopsis "Statically-linked and relocatable Guile")
;; Remove the 'debug' output (see above for the reason.)
(outputs (delete "debug" (package-outputs guile-2.0)))
(outputs (delete "debug" (package-outputs guile)))
(inputs
`(("libunistring:static" ,libunistring "static")
,@(package-inputs guile-2.2)))
,@(package-inputs guile)))
(propagated-inputs
`(("bdw-gc" ,libgc/static-libs)
,@(alist-delete "bdw-gc"
(package-propagated-inputs guile-2.0))))
(package-propagated-inputs guile))))
(arguments
(substitute-keyword-arguments (package-arguments guile-2.0)
(substitute-keyword-arguments (package-arguments guile)
((#:configure-flags flags '())
;; When `configure' checks for ltdl availability, it
;; doesn't try to link using libtool, and thus fails
@ -738,8 +735,15 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
((#:parallel-build? _ #f)
;; Work around the fact that the Guile build system is
;; not deterministic when parallel-build is enabled.
#f))))))
(package-with-relocatable-glibc (static-package guile))))
#f)))))))
(define %guile-static
;; A statically-linked Guile that is relocatable--i.e., it can search
;; .scm and .go files relative to its installation directory, rather
;; than in hard-coded configure-time paths.
(make-guile-static guile-2.0 '("guile-relocatable.patch"
"guile-default-utf8.patch"
"guile-linux-syscalls.patch")))
(define %guile-static-stripped
;; A stripped static Guile binary, for use during bootstrap.