2015-08-19 12:04:34 +02:00
|
|
|
{ stdenv, lib, autoconf, automake, go, file, git, wget, gnupg1, squashfsTools, cpio
|
2015-09-01 11:08:44 +02:00
|
|
|
, fetchurl, fetchFromGitHub }:
|
2015-08-19 12:04:34 +02:00
|
|
|
|
2015-09-01 11:08:44 +02:00
|
|
|
let
|
2015-10-25 01:57:06 +02:00
|
|
|
coreosImageRelease = "794.1.0";
|
|
|
|
coreosImageSystemdVersion = "222";
|
2015-11-17 12:44:32 +01:00
|
|
|
|
|
|
|
# TODO: track https://github.com/coreos/rkt/issues/1758 to allow "host" flavor.
|
|
|
|
stage1Flavours = [ "coreos" ];
|
2015-09-03 15:04:59 +02:00
|
|
|
|
2015-09-01 11:08:44 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
2015-11-28 12:18:26 +01:00
|
|
|
version = "0.12.0";
|
2015-08-19 12:04:34 +02:00
|
|
|
name = "rkt-${version}";
|
2015-10-25 01:57:06 +02:00
|
|
|
BUILDDIR="build-${name}";
|
2015-08-19 12:04:34 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
rev = "v${version}";
|
|
|
|
owner = "coreos";
|
|
|
|
repo = "rkt";
|
2015-11-28 12:18:26 +01:00
|
|
|
sha256 = "1qwj3a4780lqra2c6ncw86lskzqnh59fxk577hgqym4jgxxk4bbv";
|
2015-08-19 12:04:34 +02:00
|
|
|
};
|
|
|
|
|
2015-10-25 01:57:06 +02:00
|
|
|
stage1BaseImage = fetchurl {
|
2015-09-01 11:08:44 +02:00
|
|
|
url = "http://alpha.release.core-os.net/amd64-usr/${coreosImageRelease}/coreos_production_pxe_image.cpio.gz";
|
2015-10-25 01:57:06 +02:00
|
|
|
sha256 = "05nzl3av6cawr8v203a8c95c443g6h1nfy2n4jmgvn0j4iyy44ym";
|
2015-09-01 11:08:44 +02:00
|
|
|
};
|
2015-09-03 15:04:59 +02:00
|
|
|
|
2015-08-19 12:04:34 +02:00
|
|
|
buildInputs = [ autoconf automake go file git wget gnupg1 squashfsTools cpio ];
|
2015-09-03 15:04:59 +02:00
|
|
|
|
2015-08-19 12:04:34 +02:00
|
|
|
preConfigure = ''
|
|
|
|
./autogen.sh
|
2015-10-25 01:57:06 +02:00
|
|
|
configureFlagsArray=(
|
2015-11-17 12:44:32 +01:00
|
|
|
--with-stage1-flavors=${builtins.concatStringsSep "," stage1Flavours}
|
|
|
|
${if lib.findFirst (p: p == "coreos") null stage1Flavours != null then "
|
2015-10-25 01:57:06 +02:00
|
|
|
--with-coreos-local-pxe-image-path=${stage1BaseImage}
|
|
|
|
--with-coreos-local-pxe-image-systemd-version=v${coreosImageSystemdVersion}
|
2015-11-17 12:44:32 +01:00
|
|
|
" else "" }
|
2015-10-25 01:57:06 +02:00
|
|
|
);
|
2015-08-19 12:04:34 +02:00
|
|
|
'';
|
|
|
|
|
2015-09-03 15:04:59 +02:00
|
|
|
preBuild = ''
|
2015-10-25 01:57:06 +02:00
|
|
|
export BUILDDIR
|
2015-09-03 15:04:59 +02:00
|
|
|
'';
|
|
|
|
|
2015-08-19 12:04:34 +02:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2015-10-25 01:57:06 +02:00
|
|
|
cp -Rv $BUILDDIR/bin/* $out/bin
|
2015-08-19 12:04:34 +02:00
|
|
|
'';
|
2015-09-03 15:04:59 +02:00
|
|
|
|
2015-08-19 12:04:34 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A fast, composable, and secure App Container runtime for Linux";
|
2015-10-25 01:57:06 +02:00
|
|
|
homepage = https://github.com/coreos/rkt;
|
2015-08-19 12:04:34 +02:00
|
|
|
license = licenses.asl20;
|
2015-10-25 01:57:06 +02:00
|
|
|
maintainers = with maintainers; [ ragge steveej ];
|
2015-08-26 18:55:22 +02:00
|
|
|
platforms = [ "x86_64-linux" ];
|
2015-08-19 12:04:34 +02:00
|
|
|
};
|
|
|
|
}
|