Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

91 lines
1.7 KiB
Nix

{
lib,
btrfs-progs,
buildGoModule,
fetchFromGitHub,
glibc,
gpgme,
installShellFiles,
libapparmor,
libseccomp,
libselinux,
lvm2,
pkg-config,
nixosTests,
go-md2man,
}:
buildGoModule rec {
pname = "cri-o";
version = "1.34.0";
src = fetchFromGitHub {
owner = "cri-o";
repo = "cri-o";
rev = "v${version}";
hash = "sha256-mYrr5yB53ennddPjRxQPig9iqVRRO1h0UXZ/VZeEQ98=";
};
vendorHash = null;
doCheck = false;
outputs = [
"out"
"man"
];
nativeBuildInputs = [
installShellFiles
go-md2man
pkg-config
];
buildInputs = [
btrfs-progs
gpgme
libapparmor
libseccomp
libselinux
lvm2
]
++ lib.optionals (glibc != null) [
glibc
glibc.static
];
BUILDTAGS = "apparmor seccomp selinux containers_image_openpgp containers_image_ostree_stub";
buildPhase = ''
runHook preBuild
sed -i 's;\thack/;\tbash ./hack/;g' Makefile
make binaries docs BUILDTAGS="$BUILDTAGS"
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 bin/* -t $out/bin
for shell in bash fish zsh; do
installShellCompletion --$shell completions/$shell/*
done
install contrib/cni/*.conflist -Dt $out/etc/cni/net.d
install crictl.yaml -Dt $out/etc
installManPage docs/*.[1-9]
runHook postInstall
'';
passthru.tests = { inherit (nixosTests) cri-o; };
meta = with lib; {
homepage = "https://cri-o.io";
description = ''
Open Container Initiative-based implementation of the
Kubernetes Container Runtime Interface
'';
license = licenses.asl20;
teams = [ teams.podman ];
platforms = platforms.linux;
};
}