nixpkgs/pkgs/applications/virtualization/rkt/default.nix

58 lines
1.7 KiB
Nix
Raw Normal View History

2015-08-19 10:04:34 +00:00
{ stdenv, lib, autoconf, automake, go, file, git, wget, gnupg1, squashfsTools, cpio
, fetchurl, fetchFromGitHub }:
2015-08-19 10:04:34 +00:00
let
coreosImageRelease = "794.1.0";
coreosImageSystemdVersion = "222";
# TODO: track https://github.com/coreos/rkt/issues/1758 to allow "host" flavor.
stage1Flavours = [ "coreos" "fly" ];
in stdenv.mkDerivation rec {
version = "0.14.0";
2015-08-19 10:04:34 +00:00
name = "rkt-${version}";
BUILDDIR="build-${name}";
2015-08-19 10:04:34 +00:00
src = fetchFromGitHub {
rev = "v${version}";
owner = "coreos";
repo = "rkt";
sha256 = "0dmgs9s40xhan2rh9f5n0k5gv8p2dn946zffq02sq35qqvi67s71";
2015-08-19 10:04:34 +00:00
};
stage1BaseImage = fetchurl {
url = "http://alpha.release.core-os.net/amd64-usr/${coreosImageRelease}/coreos_production_pxe_image.cpio.gz";
sha256 = "05nzl3av6cawr8v203a8c95c443g6h1nfy2n4jmgvn0j4iyy44ym";
};
2015-08-19 10:04:34 +00:00
buildInputs = [ autoconf automake go file git wget gnupg1 squashfsTools cpio ];
2015-08-19 10:04:34 +00:00
preConfigure = ''
./autogen.sh
configureFlagsArray=(
--with-stage1-flavors=${builtins.concatStringsSep "," stage1Flavours}
${if lib.findFirst (p: p == "coreos") null stage1Flavours != null then "
--with-coreos-local-pxe-image-path=${stage1BaseImage}
--with-coreos-local-pxe-image-systemd-version=v${coreosImageSystemdVersion}
" else "" }
);
2015-08-19 10:04:34 +00:00
'';
preBuild = ''
export BUILDDIR
'';
2015-08-19 10:04:34 +00:00
installPhase = ''
mkdir -p $out/bin
cp -Rv $BUILDDIR/bin/* $out/bin
2015-08-19 10:04:34 +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 = https://github.com/coreos/rkt;
2015-08-19 10:04:34 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ ragge steveej ];
2015-08-26 16:55:22 +00:00
platforms = [ "x86_64-linux" ];
2015-08-19 10:04:34 +00:00
};
}