57 lines
1.7 KiB
Nix
57 lines
1.7 KiB
Nix
{ stdenv, lib, autoconf, automake, go, file, git, wget, gnupg1, squashfsTools, cpio
|
|
, fetchurl, fetchFromGitHub }:
|
|
|
|
let
|
|
coreosImageRelease = "835.9.0";
|
|
coreosImageSystemdVersion = "225";
|
|
|
|
# TODO: track https://github.com/coreos/rkt/issues/1758 to allow "host" flavor.
|
|
stage1Flavours = [ "coreos" ];
|
|
|
|
in stdenv.mkDerivation rec {
|
|
version = "0.14.0";
|
|
name = "rkt-${version}";
|
|
BUILDDIR="build-${name}";
|
|
|
|
src = fetchFromGitHub {
|
|
rev = "v${version}";
|
|
owner = "coreos";
|
|
repo = "rkt";
|
|
sha256 = "0dmgs9s40xhan2rh9f5n0k5gv8p2dn946zffq02sq35qqvi67s71";
|
|
};
|
|
|
|
stage1BaseImage = fetchurl {
|
|
url = "http://stable.release.core-os.net/amd64-usr/${coreosImageRelease}/coreos_production_pxe_image.cpio.gz";
|
|
sha256 = "51dc10b4269b9c1801c233de49da817d29ca8d858bb0881df94dc90f7e86ce70";
|
|
};
|
|
|
|
buildInputs = [ autoconf automake go file git wget gnupg1 squashfsTools cpio ];
|
|
|
|
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 "" }
|
|
);
|
|
'';
|
|
|
|
preBuild = ''
|
|
export BUILDDIR
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp -Rv $BUILDDIR/bin/* $out/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A fast, composable, and secure App Container runtime for Linux";
|
|
homepage = https://github.com/coreos/rkt;
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ ragge steveej ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|