2020-05-29 06:06:01 +00:00
|
|
|
{ cri-o-unwrapped
|
|
|
|
, runCommand
|
|
|
|
, makeWrapper
|
|
|
|
, lib
|
|
|
|
, extraPackages ? []
|
|
|
|
, runc # Default container runtime
|
|
|
|
, crun # Container runtime (default with cgroups v2 for podman/buildah)
|
|
|
|
, conmon # Container runtime monitor
|
2020-11-24 20:58:05 +00:00
|
|
|
, util-linux # nsenter
|
2020-05-29 06:06:01 +00:00
|
|
|
, iptables
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
binPath = lib.makeBinPath ([
|
|
|
|
runc
|
|
|
|
crun
|
|
|
|
conmon
|
2020-11-24 20:58:05 +00:00
|
|
|
util-linux
|
2020-05-29 06:06:01 +00:00
|
|
|
iptables
|
|
|
|
] ++ extraPackages);
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
in runCommand cri-o-unwrapped.name {
|
|
|
|
name = "${cri-o-unwrapped.pname}-wrapper-${cri-o-unwrapped.version}";
|
|
|
|
inherit (cri-o-unwrapped) pname version passthru;
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
preferLocalBuild = true;
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
meta = builtins.removeAttrs cri-o-unwrapped.meta [ "outputsToInstall" ];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
} ''
|
2022-11-21 17:40:18 +00:00
|
|
|
ln -s ${cri-o-unwrapped.man} $man
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
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
|
|
|
|
''
|