From 7049e68df79dfddf683b1ef922d2886be929d6be Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 2 Sep 2025 07:51:55 +0200 Subject: [PATCH 1/2] podman: use `versionCheckHook` --- pkgs/by-name/po/podman/package.nix | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/po/podman/package.nix b/pkgs/by-name/po/podman/package.nix index fe1029619d866..5ea42f0bce739 100644 --- a/pkgs/by-name/po/podman/package.nix +++ b/pkgs/by-name/po/podman/package.nix @@ -16,7 +16,6 @@ nixosTests, python3, makeWrapper, - runtimeShell, symlinkJoin, replaceVars, extraPackages ? [ ], @@ -34,8 +33,7 @@ netavark, passt, vfkit, - testers, - podman, + versionCheckHook, }: let # do not add qemu to this wrapper, store paths get written to the podman vm config and break when GCed @@ -124,7 +122,6 @@ buildGoModule rec { buildPhase = '' runHook preBuild patchShebangs . - substituteInPlace Makefile --replace "/bin/bash" "${runtimeShell}" ${ if stdenv.hostPlatform.isDarwin then '' @@ -164,13 +161,11 @@ buildGoModule rec { patchelf --set-rpath "${lib.makeLibraryPath [ systemd ]}":$RPATH $out/bin/.podman-wrapped ''; - passthru.tests = { - version = testers.testVersion { - package = podman; - command = "HOME=$TMPDIR podman --version"; - }; - } - // lib.optionalAttrs stdenv.hostPlatform.isLinux { + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + + passthru.tests = lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit (nixosTests) podman; # related modules inherit (nixosTests) From a062fca7f10ccc89cc9fe92593408764bdb651e5 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 2 Sep 2025 08:19:09 +0200 Subject: [PATCH 2/2] podman: replace `util-linux` with `util-linuxMinimal` --- pkgs/by-name/po/podman/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/po/podman/package.nix b/pkgs/by-name/po/podman/package.nix index 5ea42f0bce739..ad3069791ddfa 100644 --- a/pkgs/by-name/po/podman/package.nix +++ b/pkgs/by-name/po/podman/package.nix @@ -24,7 +24,7 @@ conmon, extraRuntimes ? lib.optionals stdenv.hostPlatform.isLinux [ runc ], # e.g.: runc, gvisor, youki fuse-overlayfs, - util-linux, + util-linuxMinimal, iptables, iproute2, catatonit, @@ -41,7 +41,7 @@ let binPath = lib.makeBinPath ( lib.optionals stdenv.hostPlatform.isLinux [ fuse-overlayfs - util-linux + util-linuxMinimal iptables iproute2 ]