about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
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}
 ''