2020-05-11 17:58:44 +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 15:29:28 +00:00
|
|
|
, util-linux # nsenter
|
2020-05-11 17:58:44 +00:00
|
|
|
, iptables
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
binPath = lib.makeBinPath ([
|
|
|
|
runc
|
|
|
|
crun
|
|
|
|
conmon
|
2020-11-24 15:29:28 +00:00
|
|
|
util-linux
|
2020-05-11 17:58:44 +00:00
|
|
|
iptables
|
|
|
|
] ++ extraPackages);
|
|
|
|
|
2022-11-16 02:37:22 +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-11 17:58:44 +00:00
|
|
|
|
2021-02-13 21:58:19 +00:00
|
|
|
preferLocalBuild = true;
|
|
|
|
|
2022-11-16 02:37:22 +00:00
|
|
|
meta = builtins.removeAttrs cri-o-unwrapped.meta [ "outputsToInstall" ];
|
2020-05-11 17:58:44 +00:00
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
} ''
|
2022-11-16 02:37:22 +00:00
|
|
|
ln -s ${cri-o-unwrapped.man} $man
|
2020-05-11 17:58:44 +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
|
|
|
|
''
|