push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,90 @@
{
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;
};
}

View File

@@ -0,0 +1,59 @@
{
cri-o-unwrapped,
runCommand,
makeWrapper,
lib,
extraPackages ? [ ],
runc, # Default container runtime
conntrack-tools,
crun, # Container runtime (default with cgroups v2 for podman/buildah)
conmon, # Container runtime monitor
util-linux, # nsenter
iptables,
}:
let
binPath = lib.makeBinPath (
[
runc
conntrack-tools
crun
conmon
util-linux
iptables
]
++ extraPackages
);
in
runCommand cri-o-unwrapped.name
{
name = "${cri-o-unwrapped.pname}-wrapper-${cri-o-unwrapped.version}";
inherit (cri-o-unwrapped) pname version passthru;
preferLocalBuild = true;
meta = removeAttrs cri-o-unwrapped.meta [ "outputsToInstall" ];
outputs = [
"out"
"man"
];
nativeBuildInputs = [
makeWrapper
];
}
''
ln -s ${cri-o-unwrapped.man} $man
mkdir -p $out/bin
ln -s ${cri-o-unwrapped}/etc $out/etc
ln -s ${cri-o-unwrapped}/share $out/share
for p in ${cri-o-unwrapped}/bin/*; do
makeWrapper $p $out/bin/''${p##*/} \
--prefix PATH : ${binPath}
done
''