summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/cuirass/gnu-system.scm2
-rw-r--r--build-aux/download.scm73
-rw-r--r--build-aux/hydra/gnu-system.scm21
-rw-r--r--build-aux/test-env.in16
4 files changed, 34 insertions, 78 deletions
diff --git a/build-aux/cuirass/gnu-system.scm b/build-aux/cuirass/gnu-system.scm
index c88267b9d8..f545ba03bc 100644
--- a/build-aux/cuirass/gnu-system.scm
+++ b/build-aux/cuirass/gnu-system.scm
@@ -44,4 +44,6 @@
((? license?) `((name . (license-name o))
(uri . ,(license-uri o))
(comment . ,(license-comment o))))
+ ((lst ...)
+ (map entry->sexp-entry lst))
(_ o)))
diff --git a/build-aux/download.scm b/build-aux/download.scm
deleted file mode 100644
index 8dfa914603..0000000000
--- a/build-aux/download.scm
+++ /dev/null
@@ -1,73 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2017 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
-;;;
-;;; 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/>.
-
-;;;
-;;; Download a binary file from an external source.
-;;;
-
-(use-modules (ice-9 match)
- (web uri)
- (web client)
- (rnrs io ports)
- (srfi srfi-11)
- (guix base16)
- (guix hash))
-
-(define %url-base
- "http://alpha.gnu.org/gnu/guix/bootstrap"
-
- ;; Alternately:
- ;;"http://www.fdn.fr/~lcourtes/software/guix/packages"
- )
-
-(define (file-name->uri file)
- "Return the URI for FILE."
- (match (string-tokenize file (char-set-complement (char-set #\/)))
- ((_ ... system basename)
- (string->uri
- (string-append %url-base "/" system
- (match system
- ("aarch64-linux"
- "/20170217/")
- ("armhf-linux"
- "/20150101/")
- (_
- "/20131110/"))
- basename)))))
-
-(match (command-line)
- ((_ file expected-hash)
- (let ((uri (file-name->uri file)))
- (format #t "downloading file `~a'~%from `~a'...~%"
- file (uri->string uri))
- (let*-values (((resp data) (http-get uri #:decode-body? #f))
- ((hash) (bytevector->base16-string (sha256 data)))
- ((part) (string-append file ".part")))
- (if (string=? expected-hash hash)
- (begin
- (call-with-output-file part
- (lambda (port)
- (put-bytevector port data)))
- (rename-file part file))
- (begin
- (format (current-error-port)
- "file at `~a' has SHA256 ~a; expected ~a~%"
- (uri->string uri) hash expected-hash)
- (exit 1)))))))
diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm
index e77604109e..8178871747 100644
--- a/build-aux/hydra/gnu-system.scm
+++ b/build-aux/hydra/gnu-system.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -314,6 +314,12 @@ valid."
(((? string?) (? string?) ...) 'list) ; only build selected list of packages
(_ 'all))) ; build everything
+ (define systems
+ (match (assoc-ref arguments 'systems)
+ (#f %hydra-supported-systems)
+ ((lst ...) lst)
+ ((? string? str) (call-with-input-string str read))))
+
(define (cross-jobs system)
(define (from-32-to-64? target)
;; Return true if SYSTEM is 32-bit and TARGET is 64-bit. This hack
@@ -334,8 +340,15 @@ valid."
(define (pointless? target)
;; Return #t if it makes no sense to cross-build to TARGET from SYSTEM.
- (and (string-contains target "mingw")
- (not (string=? "x86_64-linux" system))))
+ (match system
+ ((or "x86_64-linux" "i686-linux")
+ (if (string-contains target "mingw")
+ (not (string=? "x86_64-linux" system))
+ #f))
+ (_
+ ;; Don't try to cross-compile from non-Intel platforms: this isn't
+ ;; very useful and these are often brittle configurations.
+ #t)))
(define (either proc1 proc2 proc3)
(lambda (x)
@@ -397,4 +410,4 @@ valid."
'()))
(else
(error "unknown subset" subset))))
- %hydra-supported-systems)))
+ systems)))
diff --git a/build-aux/test-env.in b/build-aux/test-env.in
index 1657556b19..4a422cf607 100644
--- a/build-aux/test-env.in
+++ b/build-aux/test-env.in
@@ -1,7 +1,7 @@
#!/bin/sh
# GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of GNU Guix.
#
@@ -110,6 +110,20 @@ then
daemon_pid=$!
trap "kill $daemon_pid ; rm -rf $NIX_STATE_DIR" EXIT
+
+ # The test suite expects the 'guile-bootstrap' package to be available.
+ # Normally the Guile bootstrap tarball is downloaded by a fixed-output
+ # derivation but when network access is missing we allow users to drop
+ # the tarball in 'gnu/packages/bootstrap/SYSTEM' and "intern" it here.
+ bootstrap_directory="@abs_top_builddir@/gnu/packages/bootstrap/@guix_system@"
+ if [ -d "$bootstrap_directory" ]
+ then
+ for file in "$bootstrap_directory"/guile-*
+ do
+ "@abs_top_builddir@/pre-inst-env" \
+ guix download "file://$file" > /dev/null
+ done
+ fi
fi
# Avoid issues that could stem from l10n, such as language/encoding