2015-08-19 10:04:34 +00:00
|
|
|
{ stdenv, lib, autoconf, automake, go, file, git, wget, gnupg1, squashfsTools, cpio
|
2015-09-01 09:08:44 +00:00
|
|
|
, fetchurl, fetchFromGitHub }:
|
2015-08-19 10:04:34 +00:00
|
|
|
|
2015-09-01 09:08:44 +00:00
|
|
|
let
|
|
|
|
coreosImageRelease = "738.1.0";
|
2015-09-03 13:04:59 +00:00
|
|
|
|
2015-09-01 09:08:44 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
2015-08-19 10:04:34 +00:00
|
|
|
version = "0.8.0";
|
|
|
|
name = "rkt-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "coreos";
|
|
|
|
repo = "rkt";
|
|
|
|
sha256 = "1abv9psd5w0m8p2kvrwyjnrclzajmrpbwfwmkgpnkydhmsimhnn0";
|
|
|
|
};
|
|
|
|
|
2015-09-01 09:08:44 +00:00
|
|
|
stage1image = fetchurl {
|
|
|
|
url = "http://alpha.release.core-os.net/amd64-usr/${coreosImageRelease}/coreos_production_pxe_image.cpio.gz";
|
|
|
|
sha256 = "1rnb9rwms5g7f142d9yh169a5k2hxiximpgk4y4kqmc1294lqnl0";
|
|
|
|
};
|
2015-09-03 13:04:59 +00:00
|
|
|
|
2015-08-19 10:04:34 +00:00
|
|
|
buildInputs = [ autoconf automake go file git wget gnupg1 squashfsTools cpio ];
|
2015-09-03 13:04:59 +00:00
|
|
|
|
2015-08-19 10:04:34 +00:00
|
|
|
preConfigure = ''
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2015-09-03 13:04:59 +00:00
|
|
|
preBuild = ''
|
|
|
|
# hack to avoid downloading image during build, this has been
|
|
|
|
# improved in rkt master
|
|
|
|
mkdir -p build-rkt-0.8.0/tmp/usr_from_coreos
|
|
|
|
cp -v ${stage1image} build-rkt-0.8.0/tmp/usr_from_coreos/pxe.img
|
|
|
|
'';
|
|
|
|
|
2015-08-19 10:04:34 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp -Rv build-rkt-${version}/bin/* $out/bin
|
|
|
|
'';
|
2015-09-03 13:04:59 +00:00
|
|
|
|
2015-08-19 10:04:34 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A fast, composable, and secure App Container runtime for Linux";
|
|
|
|
homepage = http://rkt.io;
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ ragge ];
|
2015-08-26 16:55:22 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2015-08-19 10:04:34 +00:00
|
|
|
};
|
|
|
|
}
|