cri-o: init at version v1.14.1
This commits adds the CRI-O package, which includes the `crio` binary as well as `conmon` and `pause`. The configuration is not part of this package because it would be included in a service. Signed-off-by: Sascha Grunert <mail@saschagrunert.de>
This commit is contained in:
parent
115d1babce
commit
9b43c29047
|
@ -1746,13 +1746,13 @@
|
||||||
github = "fps";
|
github = "fps";
|
||||||
name = "Florian Paul Schmidt";
|
name = "Florian Paul Schmidt";
|
||||||
};
|
};
|
||||||
|
|
||||||
fragamus = {
|
fragamus = {
|
||||||
email = "innovative.engineer@gmail.com";
|
email = "innovative.engineer@gmail.com";
|
||||||
github = "fragamus";
|
github = "fragamus";
|
||||||
name = "Michael Gough";
|
name = "Michael Gough";
|
||||||
};
|
};
|
||||||
|
|
||||||
fredeb = {
|
fredeb = {
|
||||||
email = "im@fredeb.dev";
|
email = "im@fredeb.dev";
|
||||||
github = "fredeeb";
|
github = "fredeeb";
|
||||||
|
@ -4397,6 +4397,11 @@
|
||||||
github = "sargon";
|
github = "sargon";
|
||||||
name = "Daniel Ehlers";
|
name = "Daniel Ehlers";
|
||||||
};
|
};
|
||||||
|
saschagrunert = {
|
||||||
|
email = "mail@saschagrunert.de";
|
||||||
|
github = "saschagrunert";
|
||||||
|
name = "Sascha Grunert";
|
||||||
|
};
|
||||||
sauyon = {
|
sauyon = {
|
||||||
email = "s@uyon.co";
|
email = "s@uyon.co";
|
||||||
github = "sauyon";
|
github = "sauyon";
|
||||||
|
|
75
pkgs/applications/virtualization/cri-o/default.nix
Normal file
75
pkgs/applications/virtualization/cri-o/default.nix
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
{ flavor ? ""
|
||||||
|
, ldflags ? ""
|
||||||
|
, stdenv
|
||||||
|
, btrfs-progs
|
||||||
|
, buildGoPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, glibc
|
||||||
|
, gpgme
|
||||||
|
, libapparmor
|
||||||
|
, libassuan
|
||||||
|
, libgpgerror
|
||||||
|
, libseccomp
|
||||||
|
, libselinux
|
||||||
|
, lvm2
|
||||||
|
, pkgconfig
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoPackage rec {
|
||||||
|
project = "cri-o";
|
||||||
|
version = "1.14.1";
|
||||||
|
name = "${project}-${version}${flavor}";
|
||||||
|
|
||||||
|
goPackagePath = "github.com/${project}/${project}";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "cri-o";
|
||||||
|
repo = "cri-o";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "1cclxarwabk5zlqysm2dzgsm6qkxyzbnlylr0gs57ppn4ibky3nk";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = [ "bin" "out" ];
|
||||||
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
buildInputs = [ btrfs-progs gpgme libapparmor libassuan libgpgerror
|
||||||
|
libseccomp libselinux lvm2 ]
|
||||||
|
++ stdenv.lib.optionals (glibc != null) [ glibc glibc.static ];
|
||||||
|
|
||||||
|
makeFlags = ''BUILDTAGS="apparmor seccomp selinux
|
||||||
|
containers_image_ostree_stub"'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
pushd go/src/${goPackagePath}
|
||||||
|
|
||||||
|
# Build conmon and pause
|
||||||
|
go build -tags ${makeFlags} -o bin/crio-config -buildmode=pie \
|
||||||
|
-ldflags '-s -w ${ldflags}' ${goPackagePath}/cmd/crio-config
|
||||||
|
|
||||||
|
pushd conmon
|
||||||
|
../bin/crio-config
|
||||||
|
popd
|
||||||
|
|
||||||
|
make -C conmon
|
||||||
|
make -C pause
|
||||||
|
|
||||||
|
# Build the crio binary
|
||||||
|
go build -tags ${makeFlags} -o bin/crio -buildmode=pie \
|
||||||
|
-ldflags '-s -w ${ldflags}' ${goPackagePath}/cmd/crio
|
||||||
|
'';
|
||||||
|
installPhase = ''
|
||||||
|
install -Dm755 bin/crio $bin/bin/crio${flavor}
|
||||||
|
|
||||||
|
mkdir -p $bin/libexec/crio
|
||||||
|
install -Dm755 bin/conmon $bin/libexec/crio/conmon${flavor}
|
||||||
|
install -Dm755 bin/pause $bin/libexec/crio/pause${flavor}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://cri-o.io;
|
||||||
|
description = ''Open Container Initiative-based implementation of the
|
||||||
|
Kubernetes Container Runtime Interface'';
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ saschagrunert ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue