Commit Graph

282 Commits

Author SHA1 Message Date
Ludovic Courtès 75e24d7b0e
pull: Install the new Guix in a profile.
* guix/scripts/pull.scm (%pull-version): New variable.
(build-from-source): Pass #:pull-version to BUILD.
(whole-package-for-legacy, derivation->manifest-entry): New procedure.
(build-and-install): Rewrite in terms of 'build-and-use-profile'.
* guix/scripts/system.scm (maybe-suggest-running-guix-pull)[latest]:
Switch to "/current".
* scripts/guix.in (augment-load-paths!): Remove use of
~/.config/guix/latest.
* build-aux/compile-as-derivation.scm: Replace "/guix/latest/" with
"/current/share/guile/site/X.Y"
* guix/scripts.scm (warn-about-old-distro)[age]: Check "/current"
instead of "/latest".
* doc/guix.texi (Invoking guix pull): Document it.
* doc/contributing.texi (Running Guix Before It Is Installed): Remove
footnote about abusing ~/.config/guix/latest.
2018-06-09 12:02:27 +02:00
Ludovic Courtès 8a0d9bc8a3
self: Produce a complete package with the 'guix' command.
* guix/self.scm (guix-command): New procedure.
(compiled-guix): Add #:pull-version parameter.
[command, package]: New variables.
Honor PULL-VERSION.
(guix-derivation): Add #:pull-version and pass it to 'compiled-guix'.
* build-aux/build-self.scm (build-program): Add #:pull-version
parameter.  Pass it to 'guix-derivation'.
(build): Add #:pull-version and pass it to 'build-program'.
* build-aux/compile-as-derivation.scm: Pass #:pull-version to BUILD.
2018-06-09 12:02:27 +02:00
Ludovic Courtès 9e7b87ddc5
build: 'test-env' does not 'guix download' non-existent files.
Reported by uniq10.

* build-aux/test-env.in: Check whether FILE exists before invoking 'guix
download'.
2018-05-13 23:16:16 +02:00
Ludovic Courtès d6680dccb0
hydra: Switch back to "-" instead of "@" in package job names.
Fixes a regression introduced in ede121de42.
Reported by Mark H Weaver <mhw@netris.org>.

* build-aux/hydra/gnu-system.scm (job-name): Pass "-" as the second
argument to 'package-full-name'.
2018-05-12 15:58:56 +02:00
Ludovic Courtès 479c0e3f60
build: Fix possible race condition in 'test-env'.
Reported by Mark H Weaver <mhw@netris.org>.

* build-aux/test-env.in: Add 'guile' invocation before 'guix download'
invocation to make sure 'guix-daemon' is listening.
2018-04-22 23:50:49 +02:00
Ludovic Courtès df154c05dc
hydra: Fix uses of 'eval-when'.
* build-aux/hydra/gnu-system.scm: Use (expand load eval) in 'eval-when'
clause so as to not poison a cat and to ensure %load-compiled-path is
properly set when the 'use-modules' clauses are expanded.
* build-aux/hydra/guix.scm: Likewise.
2018-04-09 00:00:58 +02:00
Ludovic Courtès 98cda1b997
hydra: guix-modular: Honor the 'systems' argument.
* build-aux/hydra/guix-modular.scm (hydra-jobs)[systems]: Define as in
gnu-system.scm.
Honor SYSTEMS.
2018-04-08 22:07:47 +02:00
Ludovic Courtès f27a712840
build-self: Add missing 'close-pipe' call.
* build-aux/build-self.scm (build): Call 'close-pipe'.
2018-04-08 21:11:37 +02:00
Ludovic Courtès 16c28becf2
hydra: guix-modular: Explicitly build for the latest 2.2.
* build-aux/hydra/guix-modular.scm (build-job): Pass #:guile-version to
'build'.
2018-04-08 19:57:31 +02:00
Ludovic Courtès f6dfb8bb08
hydra: Clear '%load-compiled-path' for gnu-system.scm.
On hydra.gnu.org GUILE_LOAD_COMPILED_PATH happened to be empty so we
were fine.  However on GuixSD with Cuirass, we could have a conflicting
non-empty path and .go files for some of the (guix …) and (gnu …)
modules would be taken from there.

* build-aux/hydra/gnu-system.scm: Set %load-compiled-path.
2018-04-08 17:57:13 +02:00
Ludovic Courtès 9fe9594611
hydra: 'guix-modular' jobs use the new 'build-self'.
* build-aux/hydra/guix-modular.scm: Remove 'eval-when' form that fiddled
with '%load-path'.
(build-job): Load 'build-aux/build-self.scm' and call the procedure it
returns.
* build-aux/hydra/evaluate.scm: The 'build-things' replacement no longer
calls 'exit'.
2018-04-08 17:48:33 +02:00
Ludovic Courtès 351f384e57
cuirass: Add job specs for the modular Guix.
* build-aux/cuirass/guix-modular.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
2018-04-08 17:48:33 +02:00
Ludovic Courtès a1ec7540be
cuirass: Factorize hydra-to-cuirass CI job translation.
* build-aux/cuirass/gnu-system.scm: Move code to...
* build-aux/cuirass/hydra-to-cuirass.scm: ... here, and include it.
* Makefile.am (EXTRA_DIST): Add 'build-aux/cuirass/hydra-to-cuirass.scm'
and 'build-aux/cuirass/gnu-system.scm'.
2018-04-08 17:48:33 +02:00
Ludovic Courtès 2cfc8d6964
build: Add 'as-derivation' target.
* build-aux/compile-as-derivation.scm: New file.
* Makefile.am (as-derivation): New target.
(EXTRA_DIST): Add compile-as-derivation.scm.
2018-04-08 17:48:25 +02:00
Ludovic Courtès f0527ce3a4
build-self: Use (guix self).
This mitigates <https://bugs.gnu.org/27284>.

* build-aux/build-self.scm (libgcrypt, zlib, gzip, bzip2, xz)
(false-if-wrong-guile, package-for-current-guile, guile-json)
(guile-ssh, guile-git, guile-bytestructures, matching-guile-2.2): Remove.
(%dependency-variables, %persona-variables, %config-variables): New
variables.
(make-config.scm, load-path-expression, gexp->script)
(build-program): New procedures.
(build): Rewrite to simply delegate to 'guix-derivation'.
2018-04-08 17:41:08 +02:00
Ludovic Courtès 4debffadb7
maint: Adjust 'check-final-inputs-self-contained' for glibc:static.
This change is necessary to cope with
6dff905e51.

* build-aux/check-final-inputs-self-contained.scm (final-inputs): Change
'match' pattern to match (LABEL PACKAGE OUTPUT).
2018-03-25 00:26:13 +01:00
Mark H Weaver 150062f190
Merge branch 'master' into core-updates 2018-02-16 13:14:26 -05:00
Diego Nicola Barbato 47551a761b
pull: Update the %sbindir variable in (guix config) when building.
Fixes <https://bugs.gnu.org/30370>.

* build-aux/build-self.scm (guix): New variable.
(builder): Use it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2018-02-15 15:40:35 +01:00
Marius Bakke bee7bb315c
Merge branch 'master' into core-updates 2018-02-01 13:18:47 +01:00
Danny Milosavljevic 2a49a18e8b
hydra: Fix up arm qemu job.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Fix up arm qemu job.

Follow-up to 44b0303762.
2018-01-29 16:02:25 +01:00
Danny Milosavljevic 44b0303762
hydra: Only build the "flash image" on arm.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Only build the "flash image"
on arm.
2018-01-29 15:56:51 +01:00
Danny Milosavljevic ebd6a6445f
hydra: Work around import problem.
* build-aux/hydra/gnu-system.scm: qemu-jobs: Work around import problem.

Follow-up to 1fe805b290.
2018-01-29 13:23:07 +01:00
Danny Milosavljevic 1fe805b290
hydra: Add (gnu bootloader) import.
* build-aux/hydra/gnu-system.scm: Add (gnu bootloader) import.

Follow-up to de2bc8d6da.
2018-01-29 10:04:41 +01:00
Danny Milosavljevic de2bc8d6da
hydra: Add arm image builder.
* build-aux/hydra/gnu-system.scm (%u-boot-systems): New
variable.
(%guixsd-supported-systems): Add armhf-linux.
(qemu-jobs): Use u-boot if system in %u-boot-systems.
2018-01-29 00:11:58 +01:00
Ludovic Courtès c0fda0b0df
hydra: Make the list of target systems a parameter.
* build-aux/hydra/gnu-system.scm (hydra-jobs): Define 'systems' and use
it.
2018-01-21 01:42:59 +01:00
Ludovic Courtès 403f2dccfc
cuirass: Properly convert list of <license> objects.
Fixes a bug whereby we would 'write' raw <license> objects when they
were in a list.

* build-aux/cuirass/gnu-system.scm (entry->sexp-entry): Add recursive
case when O is a list.
2018-01-15 15:18:03 +01:00
Ludovic Courtès 8781c3d9fc
hydra: Do not cross-build from non-Intel platforms.
* build-aux/hydra/gnu-system.scm (hydra-jobs)[cross-jobs](pointless?):
Return #t on non-Intel.
2017-12-29 13:38:06 +01:00
Marius Bakke 32cd878be0
Merge branch 'master' into core-updates 2017-12-19 01:42:40 +01:00
Ludovic Courtès e2e6e9ebf0
hydra: Pre-load the compiler.
Starting from Guile 2.2.3, '%fresh-auto-compile' does what it says and
would auto-compile everything, including the compiler (see
<https://bugs.gnu.org/29226>).

* build-aux/hydra/gnu-system.scm: Call 'compile'.
2017-12-13 23:11:54 +01:00
Ludovic Courtès 34797d8afc
hydra: Invalidate derivation caches after each architecture evaluation.
This reduces max RSS from 1.3G to 1.0G.

* guix/derivations.scm (invalidate-derivation-caches!): New procedure.
* build-aux/hydra/gnu-system.scm (hydra-jobs): Use it.  Add 'format'
call.
2017-12-13 23:11:53 +01:00
Ludovic Courtès cc6a4b0386
pull: Add (guix profiling) to the build environment.
Reported by Ricardo Wurmus.

* build-aux/build-self.scm (build): Add (guix profiling).
2017-12-13 17:16:40 +01:00
Marius Bakke 9e111db453
Merge branch 'master' into core-updates 2017-12-07 18:26:11 +01:00
Ludovic Courtès 66f217b43a
pull: Build with an ABI-compatible Guile.
Fixes <https://bugs.gnu.org/29570>.
Reported by Vagrant Cascadian <vagrant@debian.org>.

* build-aux/build-self.scm (matching-guile-2.2): New procedure.
(guile-for-build): Use it.
2017-12-07 17:13:47 +01:00
Marius Bakke 77181815ae
Merge branch 'master' into core-updates 2017-12-05 23:41:30 +01:00
Ludovic Courtès c397dfca03
build: Explicitly flush the "LOAD" and "GUILEC" lines.
* build-aux/compile-all.scm <top level>: Add calls to 'force-output'
in the #:report-load and #:report-compilation procedures.  Fixes a
regression introduced in 2890ad332f
whereby compilation output would be buffered, leading to a weird
visual effect.
2017-11-28 13:40:04 +01:00
Ludovic Courtès cd295fbe17
Revert "Add (guix self) and use it when pulling."
This reverts commit 5f93d97005.

'guix pull' would fail because (guix self) needs 'scheme-files'
from (guix discovery), which was not exported until now.
2017-11-21 23:53:10 +01:00
Ludovic Courtès 11a54b3d6e
hydra: Add jobs for the modular Guix.
* build-aux/hydra/guix-modular.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
2017-11-21 23:09:17 +01:00
Ludovic Courtès 49961951c5
hydra: 'evaluate' passes an alist to the entry point.
* build-aux/hydra/evaluate.scm (%top-srcdir): New variable.
<top level>: Pass it to 'hydra-jobs'.
2017-11-21 23:09:16 +01:00
Ludovic Courtès 5f93d97005
Add (guix self) and use it when pulling.
This mitigates <https://bugs.gnu.org/27284>.

* guix/self.scm: New file.
* Makefile.am (MODULES): Add it.
* build-aux/build-self.scm (libgcrypt, zlib, gzip, bzip2, xz)
(false-if-wrong-guile, package-for-current-guile, guile-json)
(guile-ssh, guile-git, guile-bytestructures): Remove.
(build): Rewrite to simply delegate to 'compiled-guix'.
* gnu/packages.scm (%distro-root-directory): Rewrite to try different
directories.
* guix/discovery.scm (guix): Export 'scheme-files'.
* guix/scripts/pull.scm (build-and-install): Split into...
(install-latest): ... this.  New procedure.  And...
(build-and-install): ... this, which now takes a monadic value argument.
(indirect-root-added): Remove.
(guix-pull): Call 'add-indirect-root'.  Call 'build-from-source' and
pass the result to 'build-and-install'.
2017-11-21 23:09:16 +01:00
Marius Bakke 2dd12924cf
Merge branch 'master' into core-updates 2017-11-19 15:01:00 +01:00
Ludovic Courtès b574cee361
hydra: Add jobs for all of '%final-inputs'.
* build-aux/hydra/gnu-system.scm (package->job): Create a 'base.' job
when PACKAGE is a member of BASE-PACKAGES.
(all-packages)[adjust]: New procedure.
Fold over %FINAL-INPUTS and add it to the result.
2017-11-07 18:09:13 +01:00
Ludovic Courtès 25a5b187e8
hydra: Build hidden packages.
* build-aux/hydra/gnu-system.scm (all-packages): Pass #:select? to
'fold-packages'.
2017-11-07 18:09:12 +01:00
Ludovic Courtès b5033c5a9e
hydra: Factorize package list creation.
* build-aux/hydra/gnu-system.scm (all-packages): New procedure, with
body taken from...
(hydra-jobs): ... here.  Use it.
2017-11-07 18:09:12 +01:00
Marius Bakke ca4fd41de8
Merge branch 'master' into core-updates 2017-10-24 22:00:23 +02:00
Ludovic Courtès ce33c3af76
pull: Add (guix build compile) to the mix.
Fixes <https://bugs.gnu.org/28956>.
Reported by Leo Famulari <leo@famulari.name>.

* build-aux/build-self.scm (build): Add (guix build compile) to
 #:modules.
* guix/build/pull.scm (build-guix): Wrap 'compile-files' call in
'with-directory-excursion'.  Strip "./" from FILES when passing it to
'compile-files'.
2017-10-23 17:08:50 -07:00
Ludovic Courtès 3a9976bfcd
build: Honor make's '-j' flag.
* build-aux/compile-all.scm (parallel-job-count): New procedure.
<top level>: Pass it to 'compile-files' as #:workers.
2017-10-22 22:09:00 -07:00
Ludovic Courtès 2890ad332f
build: Factorize module compilation in (guix build compile).
* guix/build/compile.scm: New file.
* Makefile.am (MODULES): Add it.
* build-aux/compile-all.scm: Use it.
(warnings, file->module, load-module-file)
(%default-optimizations, %lightweight-optimizations)
(optimization-options, compile-file*): Remove.
<top level>: Use 'compile-files'.
* guix/build/pull.scm (%default-optimizations)
(%lightweight-optimizations, optimization-options): Remove.
(build-guix): Rewrite as a call to 'compile-files'.
* guix/discovery.scm (file-name->module-name): Export.
2017-10-22 22:09:00 -07:00
Thomas Danckaert 8cff2e7aed
Merge 'master' into core-updates 2017-10-16 19:52:30 +02:00
Eric Bavier 7740228e35
build: Set 'NIX_BUILD_HOOK' only if offloading is configured.
This prevents libstore/build.cc from executing nix/scripts/offload, which is
always created by config.status, when offload support is not enabled.

* build-aux/pre-inst-env.in: Export 'NIX_BUILD_HOOK' only when
configured; unset it otherwise.
2017-10-10 23:16:07 -05:00
Efraim Flashner 64df08f0cf
Merge remote-tracking branch 'origin/master' into core-updates 2017-10-01 22:16:22 +03:00