~ruther/guix-local

1c52c42fe23e042d02687e477b1a42c0bd92cf66 — Ludovic Courtès 13 years ago 735bb2a
release.nix: Pre-download the Guile bootstrap tarball.

* release.nix (bootstrap_guile): New variable.
  (build)[preBuild]: New attribute.
1 files changed, 26 insertions(+), 0 deletions(-)

M release.nix
M release.nix => release.nix +26 -0
@@ 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";