From ac4c3a0427232d8f60a85ab3f6032ecde7b41e0f Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 28 May 2026 10:28:05 +0200 Subject: [PATCH] bashunit: 0.26.0 -> 0.36.0 --- pkgs/by-name/ba/bashunit/package.nix | 34 ++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ba/bashunit/package.nix b/pkgs/by-name/ba/bashunit/package.nix index 861a598f0bec..1cea0f4f80c2 100644 --- a/pkgs/by-name/ba/bashunit/package.nix +++ b/pkgs/by-name/ba/bashunit/package.nix @@ -3,7 +3,12 @@ lib, fetchFromGitHub, bash, + bc, + gitMinimal, + gnugrep, + jq, which, + writableTmpDirAsHomeHook, versionCheckHook, coreutils, makeBinaryWrapper, @@ -12,13 +17,13 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "bashunit"; - version = "0.26.0"; + version = "0.36.0"; src = fetchFromGitHub { owner = "TypedDevs"; repo = "bashunit"; tag = finalAttrs.version; - hash = "sha256-cZ2fcm4OxA3Ly8QRkOQSjaSZW80/Pu2z10+iN4pDFOs="; + hash = "sha256-alhqJ7coRk5O4dYGx8m6u8/j7KMfr2m9Jeb5pn0wwiU="; forceFetchGit = true; # needed to include the tests directory for the check phase }; @@ -43,9 +48,21 @@ stdenvNoCC.mkDerivation (finalAttrs: { ''; doCheck = true; - nativeCheckInputs = [ which ]; + nativeCheckInputs = [ + bc + gitMinimal + jq + which + ]; checkPhase = '' runHook preCheck + patchShebangs bin/bashunit + '' + # Disabling a failing test on Darwin platforms only + + lib.optionalString stdenvNoCC.hostPlatform.isDarwin '' + rm tests/unit/console_results_test.sh + '' + + '' make test runHook postCheck ''; @@ -54,14 +71,21 @@ stdenvNoCC.mkDerivation (finalAttrs: { wrapProgram $out/bin/bashunit \ --prefix PATH : "${ lib.makeBinPath [ - coreutils + coreutils # cat, mktemp + gnugrep # grep which ] }" ''; - nativeInstallCheckInputs = [ versionCheckHook ]; + nativeInstallCheckInputs = [ + versionCheckHook + writableTmpDirAsHomeHook + ]; doInstallCheck = true; + versionCheckKeepEnvironment = [ + "HOME" + ]; passthru.updateScript = nix-update-script { };