about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/buildah
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
committerAlyssa Ross <hi@alyssa.is>2023-06-16 06:56:35 +0000
commit99fcaeccb89621dd492203ce1f2d551c06f228ed (patch)
tree41cb730ae07383004789779b0f6e11cb3f4642a3 /nixpkgs/pkgs/development/tools/buildah
parent59c5f5ac8682acc13bb22bc29c7cf02f7d75f01f (diff)
parent75a5ebf473cd60148ba9aec0d219f72e5cf52519 (diff)
downloadnixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.gz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.bz2
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.lz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.xz
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.tar.zst
nixlib-99fcaeccb89621dd492203ce1f2d551c06f228ed.zip
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts:
	nixpkgs/nixos/modules/config/console.nix
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/nixos/modules/services/mail/rss2email.nix
	nixpkgs/nixos/modules/services/networking/ssh/sshd.nix
	nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
	nixpkgs/pkgs/applications/networking/irc/weechat/default.nix
	nixpkgs/pkgs/applications/window-managers/sway/default.nix
	nixpkgs/pkgs/build-support/go/module.nix
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
	nixpkgs/pkgs/development/interpreters/python/default.nix
	nixpkgs/pkgs/development/node-packages/overrides.nix
	nixpkgs/pkgs/development/tools/b4/default.nix
	nixpkgs/pkgs/servers/dict/dictd-db.nix
	nixpkgs/pkgs/servers/mail/public-inbox/default.nix
	nixpkgs/pkgs/tools/security/pinentry/default.nix
	nixpkgs/pkgs/tools/text/unoconv/default.nix
	nixpkgs/pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/tools/buildah')
-rw-r--r--nixpkgs/pkgs/development/tools/buildah/default.nix14
-rw-r--r--nixpkgs/pkgs/development/tools/buildah/wrapper.nix32
2 files changed, 32 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/development/tools/buildah/default.nix b/nixpkgs/pkgs/development/tools/buildah/default.nix
index a31a95671c1e..c40332ff8dab 100644
--- a/nixpkgs/pkgs/development/tools/buildah/default.nix
+++ b/nixpkgs/pkgs/development/tools/buildah/default.nix
@@ -11,22 +11,24 @@
 , libapparmor
 , libselinux
 , libseccomp
+, testers
+, buildah
 }:
 
 buildGoModule rec {
   pname = "buildah";
-  version = "1.27.0";
+  version = "1.30.0";
 
   src = fetchFromGitHub {
     owner = "containers";
     repo = "buildah";
     rev = "v${version}";
-    sha256 = "sha256-xaUOCinP46aSKcxkpvDKollRRBYlrLql737YaOkQPzc=";
+    hash = "sha256-h0fipw3lJKy+VkGkh1XbZ6wUOg4001uURoJpjNq7QOs=";
   };
 
   outputs = [ "out" "man" ];
 
-  vendorSha256 = null;
+  vendorHash = null;
 
   doCheck = false;
 
@@ -46,7 +48,7 @@ buildGoModule rec {
     runHook preBuild
     patchShebangs .
     make bin/buildah
-    make -C docs GOMD2MAN="${go-md2man}/bin/go-md2man"
+    make -C docs GOMD2MAN="go-md2man"
     runHook postBuild
   '';
 
@@ -58,6 +60,10 @@ buildGoModule rec {
     runHook postInstall
   '';
 
+  passthru.tests.version = testers.testVersion {
+    package = buildah;
+  };
+
   meta = with lib; {
     description = "A tool which facilitates building OCI images";
     homepage = "https://buildah.io/";
diff --git a/nixpkgs/pkgs/development/tools/buildah/wrapper.nix b/nixpkgs/pkgs/development/tools/buildah/wrapper.nix
index 858a422a3405..7b9a672d6993 100644
--- a/nixpkgs/pkgs/development/tools/buildah/wrapper.nix
+++ b/nixpkgs/pkgs/development/tools/buildah/wrapper.nix
@@ -1,10 +1,10 @@
 { buildah-unwrapped
 , runCommand
 , makeWrapper
+, symlinkJoin
 , lib
 , stdenv
 , extraPackages ? []
-, buildah
 , runc # Default container runtime
 , crun # Container runtime (default with cgroups v2 for podman/buildah)
 , conmon # Container runtime monitor
@@ -12,13 +12,11 @@
 , fuse-overlayfs # CoW for images, much faster than default vfs
 , util-linux # nsenter
 , iptables
+, aardvark-dns
+, netavark
 }:
 
 let
-  buildah = buildah-unwrapped;
-
-  preferLocalBuild = true;
-
   binPath = lib.makeBinPath ([
   ] ++ lib.optionals stdenv.isLinux [
     runc
@@ -30,11 +28,24 @@ let
     iptables
   ] ++ extraPackages);
 
-in runCommand buildah.name {
-  name = "${buildah.pname}-wrapper-${buildah.version}";
-  inherit (buildah) pname version;
+  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 passthru;
+
+  preferLocalBuild = true;
 
-  meta = builtins.removeAttrs buildah.meta [ "outputsToInstall" ];
+  meta = builtins.removeAttrs buildah-unwrapped.meta [ "outputsToInstall" ];
 
   outputs = [
     "out"
@@ -46,10 +57,11 @@ in runCommand buildah.name {
   ];
 
 } ''
-  ln -s ${buildah.man} $man
+  ln -s ${buildah-unwrapped.man} $man
 
   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}
 ''