summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRagnar Dahlén <r.dahlen@gmail.com>2015-09-01 10:08:44 +0100
committerRagnar Dahlén <r.dahlen@gmail.com>2015-09-01 10:08:44 +0100
commit6e1bee84d36e4f32f920dda6321719c5576f6588 (patch)
tree28c3f5bc353ee0986b7f9f5edae84bc1807e96ec /pkgs
parent9013dc5826dfd9d2d376fd0f45f4031a8cfa0c55 (diff)
downloadnixpkgs-6e1bee84d36e4f32f920dda6321719c5576f6588.tar
nixpkgs-6e1bee84d36e4f32f920dda6321719c5576f6588.tar.gz
nixpkgs-6e1bee84d36e4f32f920dda6321719c5576f6588.tar.bz2
nixpkgs-6e1bee84d36e4f32f920dda6321719c5576f6588.tar.lz
nixpkgs-6e1bee84d36e4f32f920dda6321719c5576f6588.tar.xz
nixpkgs-6e1bee84d36e4f32f920dda6321719c5576f6588.tar.zst
nixpkgs-6e1bee84d36e4f32f920dda6321719c5576f6588.zip
rkt: Don't download stage1 image during build.
The rkt build process requires a stage1 image. By default it will try
and download one with wget from coreos.com during the build. This change
explicitly downloads the image using `fetchurl`, verifying checksum,
then passes that to the build using appropriate configure flag.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/virtualization/rkt/default.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/applications/virtualization/rkt/default.nix b/pkgs/applications/virtualization/rkt/default.nix
index 71aa7a710f9..e873608733a 100644
--- a/pkgs/applications/virtualization/rkt/default.nix
+++ b/pkgs/applications/virtualization/rkt/default.nix
@@ -1,7 +1,10 @@
 { stdenv, lib, autoconf, automake, go, file, git, wget, gnupg1, squashfsTools, cpio
-, fetchFromGitHub }:
+, fetchurl, fetchFromGitHub }:
 
-stdenv.mkDerivation rec {
+let
+  coreosImageRelease = "738.1.0";
+  
+in stdenv.mkDerivation rec {
   version = "0.8.0";
   name = "rkt-${version}";
 
@@ -12,12 +15,19 @@ stdenv.mkDerivation rec {
       sha256 = "1abv9psd5w0m8p2kvrwyjnrclzajmrpbwfwmkgpnkydhmsimhnn0";
   };
 
+  stage1image = fetchurl {
+    url = "http://alpha.release.core-os.net/amd64-usr/${coreosImageRelease}/coreos_production_pxe_image.cpio.gz";
+    sha256 = "1rnb9rwms5g7f142d9yh169a5k2hxiximpgk4y4kqmc1294lqnl0";
+  };
+  
   buildInputs = [ autoconf automake go file git wget gnupg1 squashfsTools cpio ];
   
   preConfigure = ''
     ./autogen.sh
   '';
 
+  configureFlags = "--with-stage1-image-path=${stage1image}";
+  
   installPhase = ''
     mkdir -p $out/bin
     cp -Rv build-rkt-${version}/bin/* $out/bin