summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-06-11 23:52:15 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-06-11 23:52:15 +0200
commita032b4454b3fc67e11e9fc2d8c2345288065fa29 (patch)
treec208124b79dbd2224b68c52106aa72ff2ebfa7ab /build-aux
parentb5724230fed2d043206df20d12a45bb962b7ee77 (diff)
parent6321ce42ab4d9ab788d858cb19bde4aa7a0e3ecc (diff)
Merge branch 'master' into staging
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/build-self.scm19
-rw-r--r--build-aux/compile-as-derivation.scm5
-rw-r--r--build-aux/hydra/gnu-system.scm3
-rw-r--r--build-aux/hydra/guix-modular.scm1
-rw-r--r--build-aux/test-env.in1
5 files changed, 21 insertions, 8 deletions
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index bccb7a959e..5898b6515c 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -184,7 +184,8 @@ person's version identifier."
(date->string (current-date 0) "~Y~m~d.~H"))
(define* (build-program source version
- #:optional (guile-version (effective-version)))
+ #:optional (guile-version (effective-version))
+ #:key (pull-version 0))
"Return a program that computes the derivation to build Guix from SOURCE."
(define select?
;; Select every module but (guix config) and non-Guix modules.
@@ -253,11 +254,14 @@ person's version identifier."
(spin system)))
(display
- (derivation-file-name
+ (and=>
(run-with-store store
(guix-derivation #$source #$version
- #$guile-version)
- #:system system)))))))
+ #$guile-version
+ #:pull-version
+ #$pull-version)
+ #:system system)
+ derivation-file-name))))))
#:module-path (list source))))
;; The procedure below is our return value.
@@ -266,13 +270,15 @@ person's version identifier."
(guile-version (match ((@ (guile) version))
("2.2.2" "2.2.2")
(_ (effective-version))))
+ (pull-version 0)
#:allow-other-keys
#:rest rest)
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme
files."
;; Build the build program and then use it as a trampoline to build from
;; SOURCE.
- (mlet %store-monad ((build (build-program source version guile-version))
+ (mlet %store-monad ((build (build-program source version guile-version
+ #:pull-version pull-version))
(system (if system (return system) (current-system))))
(mbegin %store-monad
(show-what-to-build* (list build))
@@ -292,6 +298,9 @@ files."
(return (newline (current-output-port)))
((store-lift add-temp-root) drv)
(return (read-derivation-from-file drv))))
+ ("#f"
+ ;; Unsupported PULL-VERSION.
+ (return #f))
((? string? str)
(error "invalid build result" (list build str))))))))
diff --git a/build-aux/compile-as-derivation.scm b/build-aux/compile-as-derivation.scm
index afb134a92a..59a84b1415 100644
--- a/build-aux/compile-as-derivation.scm
+++ b/build-aux/compile-as-derivation.scm
@@ -25,7 +25,8 @@
(and=> (or (getenv "XDG_CONFIG_HOME")
(and=> (getenv "HOME")
(cut string-append <> "/.config")))
- (cut string-append <> "/guix/latest")))
+ (cute string-append <> "/guix/current/share/guile/site/"
+ (effective-version))))
(use-modules (guix) (guix ui)
(guix git-download)
@@ -43,7 +44,7 @@
(mlet* %store-monad ((source (interned-file source "guix-source"
#:select? git?
#:recursive? #t))
- (drv (build source)))
+ (drv (build source #:pull-version 1)))
(mbegin %store-monad
(show-what-to-build* (list drv))
(built-derivations (list drv))
diff --git a/build-aux/hydra/gnu-system.scm b/build-aux/hydra/gnu-system.scm
index 62eb957f83..654f3ecf3e 100644
--- a/build-aux/hydra/gnu-system.scm
+++ b/build-aux/hydra/gnu-system.scm
@@ -264,7 +264,8 @@ all its dependencies, and ready to be installed on non-GuixSD distributions.")
(define job-name
;; Return the name of a package's job.
- (compose string->symbol package-full-name))
+ (compose string->symbol
+ (cut package-full-name <> "-")))
(define package->job
(let ((base-packages
diff --git a/build-aux/hydra/guix-modular.scm b/build-aux/hydra/guix-modular.scm
index 58e09e1831..9ff9e090fc 100644
--- a/build-aux/hydra/guix-modular.scm
+++ b/build-aux/hydra/guix-modular.scm
@@ -46,6 +46,7 @@ for SYSTEM. Use VERSION as the version identifier."
`((derivation . ,(derivation-file-name
(run-with-store store
(build source #:version version #:system system
+ #:pull-version 1
#:guile-version "2.2")))) ;the latest 2.2.x
(description . "Modular Guix")
(long-description
diff --git a/build-aux/test-env.in b/build-aux/test-env.in
index 52082c650f..aaadcf205b 100644
--- a/build-aux/test-env.in
+++ b/build-aux/test-env.in
@@ -132,6 +132,7 @@ then
for file in "$bootstrap_directory"/guile-*
do
+ [ -f "$file" ] && \
"@abs_top_builddir@/pre-inst-env" \
guix download "file://$file" > /dev/null
done