nixpkgs/pkgs/tools/misc/bash_unit/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
985 B
Nix
Raw Normal View History

2020-01-04 16:38:55 +00:00
{ fetchFromGitHub
, lib, stdenv
2020-01-04 16:38:55 +00:00
}:
stdenv.mkDerivation rec {
pname = "bash_unit";
2024-03-09 11:07:25 +00:00
version = "2.3.1";
2020-01-04 16:38:55 +00:00
src = fetchFromGitHub {
owner = "pgrange";
repo = pname;
rev = "v${version}";
2024-03-09 11:07:25 +00:00
sha256 = "sha256-kd5h12yjzvR/RBE/IjVXNSyjcf+rz6B2eoO8w2jiaps=";
2020-01-04 16:38:55 +00:00
};
2024-01-13 07:49:49 +00:00
patchPhase = ''
runHook prePatch
patchShebangs bash_unit
for t in tests/test_*; do
chmod +x "$t" # make test file visible to `patchShebangs`
patchShebangs "$t"
chmod -x "$t"
done
runHook postPatch
'';
doCheck = true;
checkPhase = ''
runHook preCheck
./bash_unit ./tests/test_core.sh
runHook postCheck
'';
2020-01-04 16:38:55 +00:00
installPhase = ''
mkdir -p $out/bin
cp bash_unit $out/bin/
'';
meta = with lib; {
2020-01-04 16:38:55 +00:00
description = "Bash unit testing enterprise edition framework for professionals";
maintainers = with maintainers; [ pamplemousse ];
2021-03-18 15:22:39 +00:00
platforms = platforms.all;
2020-01-04 16:38:55 +00:00
license = licenses.gpl3Plus;
2023-11-27 01:17:53 +00:00
mainProgram = "bash_unit";
2020-01-04 16:38:55 +00:00
};
}