aboutsummaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/check-available-binaries.scm2
-rw-r--r--build-aux/check-final-inputs-self-contained.scm2
-rw-r--r--build-aux/hydra/gnu-system.scm33
-rw-r--r--build-aux/hydra/guix.scm33
-rwxr-xr-xbuild-aux/list-packages.scm6
-rw-r--r--build-aux/make-binary-tarball.scm47
6 files changed, 90 insertions, 33 deletions
diff --git a/build-aux/check-available-binaries.scm b/build-aux/check-available-binaries.scm
index bc6207eb2a..04f88b7d0c 100644
--- a/build-aux/check-available-binaries.scm
+++ b/build-aux/check-available-binaries.scm
@@ -33,7 +33,7 @@
(let* ((native (append-map (lambda (system)
(map (cut package-derivation store <> system)
(list %bootstrap-tarballs emacs)))
- %supported-systems))
+ %hydra-supported-systems))
(cross (map (cut package-cross-derivation store
%bootstrap-tarballs <>)
'("mips64el-linux-gnuabi64")))
diff --git a/build-aux/check-final-inputs-self-contained.scm b/build-aux/check-final-inputs-self-contained.scm
index ba85c876d2..9b791f2e2d 100644
--- a/build-aux/check-final-inputs-self-contained.scm
+++ b/build-aux/check-final-inputs-self-contained.scm
@@ -77,5 +77,5 @@ refer to the bootstrap tools."
(set-build-options store #:use-substitutes? #t)
(for-each (cut test-final-inputs store <>)
- %supported-systems)))
+ %hydra-supported-systems)))
diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm
index cfef7dc425..8d9b43c0b0 100644
--- a/build-aux/hydra/gnu-system.scm
+++ b/build-aux/hydra/gnu-system.scm
@@ -54,6 +54,7 @@
(gnu packages multiprecision)
(gnu packages make-bootstrap)
(gnu packages commencement)
+ (gnu packages package-management)
(gnu system)
(gnu system vm)
(gnu system install)
@@ -158,9 +159,33 @@ system.")
(set-guile-for-build (default-guile))
(system-disk-image installation-os
#:disk-image-size
- (* 800 MiB))))))
+ (* 860 MiB))))))
'()))
+(define (tarball-jobs store system)
+ "Return Hydra jobs to build the self-contained Guix binary tarball."
+ (define (->alist drv)
+ `((derivation . ,(derivation-file-name drv))
+ (description . "Stand-alone binary Guix tarball")
+ (long-description . "This is a tarball containing binaries of Guix and
+all its dependencies, and ready to be installed on non-GuixSD distributions.")
+ (license . ,gpl3+)
+ (home-page . ,%guix-home-page-url)
+ (maintainers . ("bug-guix@gnu.org"))))
+
+ (define (->job name drv)
+ (let ((name (symbol-append name (string->symbol ".")
+ (string->symbol system))))
+ `(,name . ,(cut ->alist drv))))
+
+ ;; XXX: Add a job for the stable Guix?
+ (list (->job 'binary-tarball
+ (run-with-store store
+ (mbegin %store-monad
+ (set-guile-for-build (default-guile))
+ (self-contained-tarball))
+ #:system system))))
+
(define job-name
;; Return the name of a package's job.
(compose string->symbol package-full-name))
@@ -179,8 +204,7 @@ system.")
valid."
(cond ((member package base-packages)
#f)
- ((member system
- (package-transitive-supported-systems package))
+ ((supported-package? package system)
(package-job store (job-name package) package system))
(else
#f)))))
@@ -234,6 +258,7 @@ valid."
(cons job result)
result)))
(append (qemu-jobs store system)
+ (tarball-jobs store system)
(cross-jobs system))))
((core)
;; Build core packages only.
@@ -244,4 +269,4 @@ valid."
(cross-jobs system)))
(else
(error "unknown subset" subset))))
- %supported-systems))
+ %hydra-supported-systems))
diff --git a/build-aux/hydra/guix.scm b/build-aux/hydra/guix.scm
index 3996a0b422..1035f81b4a 100644
--- a/build-aux/hydra/guix.scm
+++ b/build-aux/hydra/guix.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -68,25 +68,10 @@
(home-page . ,(package-home-page package))
(maintainers . ("bug-guix@gnu.org"))))
-(define (tarball-package checkout nix-checkout)
+(define (tarball-package checkout)
"Return a package that does `make distcheck' from CHECKOUT, a directory
containing a Git checkout of Guix."
- (let ((dist (dist-package guix checkout)))
- (package (inherit dist)
- (location (source-properties->location (current-source-location)))
- (arguments (substitute-keyword-arguments (package-arguments dist)
- ((#:phases p)
- `(alist-cons-before
- 'autoreconf 'set-nix-submodule
- (lambda _
- ;; Tell Git to use the Nix checkout that Hydra gave us.
- (zero?
- (system* "git" "config" "submodule.nix-upstream.url"
- ,nix-checkout)))
- ,p))))
- (native-inputs `(("git" ,git)
- ("graphviz" ,graphviz)
- ,@(package-native-inputs dist))))))
+ (dist-package guix checkout))
(define (hydra-jobs store arguments)
"Return Hydra jobs."
@@ -104,13 +89,9 @@ containing a Git checkout of Guix."
(define guix-checkout
(assq-ref arguments 'guix))
- (define nix-checkout
- (assq-ref arguments 'nix))
-
- (format (current-error-port) "using checkout ~s (Nix: ~s)~%"
- guix-checkout nix-checkout)
- (let ((guix (assq-ref guix-checkout 'file-name))
- (nix (assq-ref nix-checkout 'file-name)))
+ (let ((guix (assq-ref guix-checkout 'file-name)))
+ (format (current-error-port) "using checkout ~s (~s)~%"
+ guix-checkout guix)
`((tarball . ,(cute package->alist store
- (tarball-package guix nix)
+ (tarball-package guix)
(%current-system))))))
diff --git a/build-aux/list-packages.scm b/build-aux/list-packages.scm
index f3e4ac2846..c4f445291b 100755
--- a/build-aux/list-packages.scm
+++ b/build-aux/list-packages.scm
@@ -167,7 +167,11 @@ decreasing, is 1."
,system))
`(div "status: "
- ,(list-join (map url (package-transitive-supported-systems package))
+ ,(list-join (map url
+ (lset-intersection
+ string=?
+ %hydra-supported-systems
+ (package-transitive-supported-systems package)))
" ")))
(define (package-logo name)
diff --git a/build-aux/make-binary-tarball.scm b/build-aux/make-binary-tarball.scm
new file mode 100644
index 0000000000..e12bec476c
--- /dev/null
+++ b/build-aux/make-binary-tarball.scm
@@ -0,0 +1,47 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+
+;;;
+;;; Build a self-contained tarball containing binaries for Guix and its
+;;; dependencies.
+;;;
+
+(use-modules (guix)
+ (guix ui)
+ (gnu system install)
+ (ice-9 match))
+
+(define copy-file*
+ (lift2 copy-file %store-monad))
+
+(define rename-file*
+ (lift2 rename-file %store-monad))
+
+(match (command-line)
+ ((_ system file)
+ (with-store store
+ (run-with-store store
+ (mlet %store-monad ((tarball (self-contained-tarball)))
+ (mbegin %store-monad
+ (show-what-to-build* (list tarball))
+ (built-derivations (list tarball))
+ (copy-file* (derivation->output-path tarball)
+ (string-append file ".part"))
+ (rename-file* (string-append file ".part") file)))
+ #:system system))))