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