release.nix: Pre-download the Guile bootstrap tarball.

* release.nix (bootstrap_guile): New variable.
  (build)[preBuild]: New attribute.
This commit is contained in:
Ludovic Courtès 2012-10-27 22:45:18 +02:00
parent 735bb2af10
commit 1c52c42fe2

View file

@ -26,6 +26,22 @@ let
succeedOnFailure = true;
keepBuildDirectory = true;
# The Guile used to bootstrap the whole thing. It's normally
# downloaded by the build system, but here we download it via a
# fixed-output derivation and stuff it into the build tree.
bootstrap_guile =
let pkgs = import nixpkgs {}; in {
i686 = pkgs.fetchurl {
url = http://www.fdn.fr/~lcourtes/software/guix/packages/i686-linux/guile-bootstrap-2.0.6.tar.xz;
sha256 = "93b537766dfab3ad287143523751e3ec02dd32d3ccaf88ad2d31c63158f342ee";
};
x86_64 = pkgs.fetchurl {
url = http://www.fdn.fr/~lcourtes/software/guix/packages/x86_64-linux/guile-bootstrap-2.0.6.tar.xz;
sha256 = "0467a82cbe4136f60a79eb4176011bf88cf28ea19c9ad9defa365811ff8e11cf";
};
};
jobs = {
tarball =
let pkgs = import nixpkgs {}; in
@ -52,6 +68,16 @@ let
"--with-libgcrypt-prefix=${pkgs.libgcrypt}"
];
preBuild =
# Use our pre-downloaded bootstrap tarballs instead of letting
# the build system download it over and over again.
'' mkdir -p distro/packages/bootstrap/{i686,x86_64}-linux
cp -v "${bootstrap_guile.i686}" \
distro/packages/bootstrap/i686-linux/guile-bootstrap-2.0.6.tar.xz
cp -v "${bootstrap_guile.x86_64}" \
distro/packages/bootstrap/x86_64-linux/guile-bootstrap-2.0.6.tar.xz
'';
# XXX: Since we need to talk to a running daemon, for the benefit of
# `nixpkgs-derivation*' & co., we need to escape the chroot.
preConfigure = "export NIX_REMOTE=daemon";