about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2023-01-26 20:05:08 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2023-01-26 22:04:11 +1000
commitcdbe7c69c2ac408df85f8ded225305ef12c0276b (patch)
treec6bf7980c5a5ace4ffcbdd72053e6173c26546f3 /pkgs
parentec58d4089ed716675b8d71d3646144e56e4d41a0 (diff)
buildah: wrap netavark via CONTAINERS_HELPER_BINARY_DIR
consistent with podman wrapper
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/buildah/wrapper.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/tools/buildah/wrapper.nix b/pkgs/development/tools/buildah/wrapper.nix
index aa14a01b86448..575ee45d7d812 100644
--- a/pkgs/development/tools/buildah/wrapper.nix
+++ b/pkgs/development/tools/buildah/wrapper.nix
@@ -1,6 +1,7 @@
 { buildah-unwrapped
 , runCommand
 , makeWrapper
+, symlinkJoin
 , lib
 , stdenv
 , extraPackages ? []
@@ -11,6 +12,8 @@
 , fuse-overlayfs # CoW for images, much faster than default vfs
 , util-linux # nsenter
 , iptables
+, aardvark-dns
+, netavark
 }:
 
 let
@@ -25,6 +28,17 @@ let
     iptables
   ] ++ extraPackages);
 
+  helpersBin = symlinkJoin {
+    name = "${buildah-unwrapped.pname}-helper-binary-wrapper-${buildah-unwrapped.version}";
+
+    # this only works for some binaries, others may need to be be added to `binPath` or in the modules
+    paths = [
+    ] ++ lib.optionals stdenv.isLinux [
+      aardvark-dns
+      netavark
+    ];
+  };
+
 in runCommand buildah-unwrapped.name {
   name = "${buildah-unwrapped.pname}-wrapper-${buildah-unwrapped.version}";
   inherit (buildah-unwrapped) pname version;
@@ -48,5 +62,6 @@ in runCommand buildah-unwrapped.name {
   mkdir -p $out/bin
   ln -s ${buildah-unwrapped}/share $out/share
   makeWrapper ${buildah-unwrapped}/bin/buildah $out/bin/buildah \
+    --set CONTAINERS_HELPER_BINARY_DIR ${helpersBin}/bin \
     --prefix PATH : ${binPath}
 ''