nixpkgs/pkgs/applications/virtualization/cri-o/wrapper.nix
Sascha Grunert 1e8324291e cri-o: 1.18.3 -> 1.19.0
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-09-17 17:50:57 +10:00

52 lines
933 B
Nix

{ cri-o-unwrapped
, runCommand
, makeWrapper
, lib
, extraPackages ? []
, cri-o
, runc # Default container runtime
, crun # Container runtime (default with cgroups v2 for podman/buildah)
, conmon # Container runtime monitor
, utillinux # nsenter
, cni-plugins # not added to path
, iptables
}:
let
cri-o = cri-o-unwrapped;
binPath = lib.makeBinPath ([
runc
crun
conmon
utillinux
iptables
] ++ extraPackages);
in runCommand cri-o.name {
name = "${cri-o.pname}-wrapper-${cri-o.version}";
inherit (cri-o) pname version passthru;
meta = builtins.removeAttrs cri-o.meta [ "outputsToInstall" ];
outputs = [
"out"
"man"
];
nativeBuildInputs = [
makeWrapper
];
} ''
ln -s ${cri-o.man} $man
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
''