cri-o: refactor wrapper

This commit is contained in:
zowoq 2022-11-16 12:37:22 +10:00
parent 5d1d22047c
commit 684ffc109e

View file

@ -3,7 +3,6 @@
, makeWrapper
, lib
, extraPackages ? []
, cri-o
, runc # Default container runtime
, crun # Container runtime (default with cgroups v2 for podman/buildah)
, conmon # Container runtime monitor
@ -12,8 +11,6 @@
}:
let
cri-o = cri-o-unwrapped;
binPath = lib.makeBinPath ([
runc
crun
@ -22,13 +19,13 @@ let
iptables
] ++ extraPackages);
in runCommand cri-o.name {
name = "${cri-o.pname}-wrapper-${cri-o.version}";
inherit (cri-o) pname version passthru;
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 = builtins.removeAttrs cri-o.meta [ "outputsToInstall" ];
meta = builtins.removeAttrs cri-o-unwrapped.meta [ "outputsToInstall" ];
outputs = [
"out"
@ -40,7 +37,7 @@ in runCommand cri-o.name {
];
} ''
ln -s ${cri-o.man} $man
ln -s ${cri-o-unwrapped.man} $man
mkdir -p $out/bin
ln -s ${cri-o-unwrapped}/share $out/share