diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-10-19 23:02:07 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-10-20 11:51:07 +0200 |
commit | 5cbb559046671c824b090f9540bdf29e26c7c6d9 (patch) | |
tree | e9c4c9493b38d9d49537a6604593f6a29c39b482 /distro/packages | |
parent | 5cc30616736e7c3eaaf79b4bb313cdfaa52a7d98 (diff) | |
download | guix-5cbb559046671c824b090f9540bdf29e26c7c6d9.tar.gz guix-5cbb559046671c824b090f9540bdf29e26c7c6d9.zip |
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'.
Diffstat (limited to 'distro/packages')
-rw-r--r-- | distro/packages/base.scm | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/distro/packages/base.scm b/distro/packages/base.scm index 5e0b30ce89..2f4bbecbb8 100644 --- a/distro/packages/base.scm +++ b/distro/packages/base.scm @@ -2163,32 +2163,42 @@ store.") #t)))) (inputs `(("guile" ,%guile-static))))) -(define %guile-bootstrap-tarball - ;; A tarball with the statically-linked, relocatable Guile. - (package (inherit %guile-static) - (name "guile-bootstrap-tarball") +(define (tarball-package pkg) + "Return a package containing a tarball of PKG." + (package (inherit pkg) + (location (source-properties->location (current-source-location))) + (name (string-append (package-name pkg) "-tarball")) (build-system trivial-build-system) (inputs `(("tar" ,tar) ("xz" ,xz) - ("guile" ,%guile-static-stripped))) + ("input" ,pkg))) (arguments (lambda (system) - `(#:modules ((guix build utils)) - #:builder - (begin - (use-modules (guix build utils)) - (let ((out (assoc-ref %outputs "out")) - (guile (assoc-ref %build-inputs "guile")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz"))) - (mkdir out) - (set-path-environment-variable "PATH" '("bin") (list tar xz)) - (with-directory-excursion guile - (zero? (system* "tar" "cJvf" - (string-append out "/guile-bootstrap-" - ,(package-version %guile-static) - "-" ,system - ".tar.xz") - ".")))))))))) + (let ((name (package-name pkg)) + (version (package-version pkg))) + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let ((out (assoc-ref %outputs "out")) + (input (assoc-ref %build-inputs "input")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz"))) + (mkdir out) + (set-path-environment-variable "PATH" '("bin") (list tar xz)) + (with-directory-excursion input + (zero? (system* "tar" "cJvf" + (string-append out "/" + ,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 |