Commit 684ffc10 authored by zowoq's avatar zowoq
Browse files

cri-o: refactor wrapper

parent 5d1d2204
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -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