2019-05-19 13:25:52 +01:00
|
|
|
{ flavor ? ""
|
|
|
|
, stdenv
|
|
|
|
, btrfs-progs
|
|
|
|
, buildGoPackage
|
|
|
|
, fetchFromGitHub
|
2020-02-10 08:10:11 +00:00
|
|
|
, git
|
2019-05-19 13:25:52 +01:00
|
|
|
, glibc
|
|
|
|
, gpgme
|
|
|
|
, libapparmor
|
|
|
|
, libassuan
|
|
|
|
, libgpgerror
|
|
|
|
, libseccomp
|
|
|
|
, libselinux
|
|
|
|
, lvm2
|
|
|
|
, pkgconfig
|
2020-02-10 08:10:11 +00:00
|
|
|
, which
|
2019-05-19 13:25:52 +01:00
|
|
|
}:
|
|
|
|
|
2019-10-28 09:17:49 +00:00
|
|
|
let
|
2020-01-22 15:33:15 +00:00
|
|
|
buildTags = "apparmor seccomp selinux containers_image_ostree_stub";
|
2019-10-28 09:17:49 +00:00
|
|
|
in buildGoPackage rec {
|
2019-05-19 13:25:52 +01:00
|
|
|
project = "cri-o";
|
2020-04-14 08:24:32 +01:00
|
|
|
version = "1.17.3";
|
2019-05-19 13:25:52 +01:00
|
|
|
name = "${project}-${version}${flavor}";
|
|
|
|
|
|
|
|
goPackagePath = "github.com/${project}/${project}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cri-o";
|
|
|
|
repo = "cri-o";
|
|
|
|
rev = "v${version}";
|
2020-04-14 08:24:32 +01:00
|
|
|
sha256 = "1cy2lqasfn5n20vlm3ckb6myci8ya6qv08dw8fq7z4ycnm39r1a6";
|
2019-05-19 13:25:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" ];
|
2020-02-10 08:10:11 +00:00
|
|
|
nativeBuildInputs = [ git pkgconfig which ];
|
2019-05-19 13:25:52 +01:00
|
|
|
buildInputs = [ btrfs-progs gpgme libapparmor libassuan libgpgerror
|
|
|
|
libseccomp libselinux lvm2 ]
|
|
|
|
++ stdenv.lib.optionals (glibc != null) [ glibc glibc.static ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
pushd go/src/${goPackagePath}
|
|
|
|
|
2020-02-10 08:10:11 +00:00
|
|
|
make BUILDTAGS='${buildTags}' \
|
|
|
|
bin/crio \
|
|
|
|
bin/crio-status \
|
|
|
|
bin/pinns
|
2019-05-19 13:25:52 +01:00
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 bin/crio $bin/bin/crio${flavor}
|
2019-11-06 14:17:52 +00:00
|
|
|
install -Dm755 bin/crio-status $bin/bin/crio-status${flavor}
|
2020-02-10 08:10:11 +00:00
|
|
|
install -Dm755 bin/pinns $bin/bin/pinns${flavor}
|
2019-05-19 13:25:52 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://cri-o.io";
|
2019-05-19 13:25:52 +01:00
|
|
|
description = ''Open Container Initiative-based implementation of the
|
|
|
|
Kubernetes Container Runtime Interface'';
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ saschagrunert ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|