distro: Add a package to build a tarball of the bootstrap binaries.
* distro/packages/base.scm (tarball-package): New procedure. (%bootstrap-binaries-tarball): New variable. (%guile-bootstrap-tarball): Define in terms of `tarball-package'.
This commit is contained in:
parent
5cc3061673
commit
5cbb559046
|
@ -2163,32 +2163,42 @@ store.")
|
||||||
#t))))
|
#t))))
|
||||||
(inputs `(("guile" ,%guile-static)))))
|
(inputs `(("guile" ,%guile-static)))))
|
||||||
|
|
||||||
(define %guile-bootstrap-tarball
|
(define (tarball-package pkg)
|
||||||
;; A tarball with the statically-linked, relocatable Guile.
|
"Return a package containing a tarball of PKG."
|
||||||
(package (inherit %guile-static)
|
(package (inherit pkg)
|
||||||
(name "guile-bootstrap-tarball")
|
(location (source-properties->location (current-source-location)))
|
||||||
|
(name (string-append (package-name pkg) "-tarball"))
|
||||||
(build-system trivial-build-system)
|
(build-system trivial-build-system)
|
||||||
(inputs `(("tar" ,tar)
|
(inputs `(("tar" ,tar)
|
||||||
("xz" ,xz)
|
("xz" ,xz)
|
||||||
("guile" ,%guile-static-stripped)))
|
("input" ,pkg)))
|
||||||
(arguments
|
(arguments
|
||||||
(lambda (system)
|
(lambda (system)
|
||||||
`(#:modules ((guix build utils))
|
(let ((name (package-name pkg))
|
||||||
#:builder
|
(version (package-version pkg)))
|
||||||
(begin
|
`(#:modules ((guix build utils))
|
||||||
(use-modules (guix build utils))
|
#:builder
|
||||||
(let ((out (assoc-ref %outputs "out"))
|
(begin
|
||||||
(guile (assoc-ref %build-inputs "guile"))
|
(use-modules (guix build utils))
|
||||||
(tar (assoc-ref %build-inputs "tar"))
|
(let ((out (assoc-ref %outputs "out"))
|
||||||
(xz (assoc-ref %build-inputs "xz")))
|
(input (assoc-ref %build-inputs "input"))
|
||||||
(mkdir out)
|
(tar (assoc-ref %build-inputs "tar"))
|
||||||
(set-path-environment-variable "PATH" '("bin") (list tar xz))
|
(xz (assoc-ref %build-inputs "xz")))
|
||||||
(with-directory-excursion guile
|
(mkdir out)
|
||||||
(zero? (system* "tar" "cJvf"
|
(set-path-environment-variable "PATH" '("bin") (list tar xz))
|
||||||
(string-append out "/guile-bootstrap-"
|
(with-directory-excursion input
|
||||||
,(package-version %guile-static)
|
(zero? (system* "tar" "cJvf"
|
||||||
"-" ,system
|
(string-append out "/"
|
||||||
".tar.xz")
|
,name "-" ,version
|
||||||
"."))))))))))
|
"-" ,system ".tar.xz")
|
||||||
|
".")))))))))))
|
||||||
|
|
||||||
|
(define %bootstrap-binaries-tarball
|
||||||
|
;; A tarball with the statically-linked bootstrap binaries.
|
||||||
|
(tarball-package %static-binaries))
|
||||||
|
|
||||||
|
(define %guile-bootstrap-tarball
|
||||||
|
;; A tarball with the statically-linked, relocatable Guile.
|
||||||
|
(tarball-package %guile-static-stripped))
|
||||||
|
|
||||||
;;; base.scm ends here
|
;;; base.scm ends here
|
||||||
|
|
Loading…
Reference in New Issue