2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchPypi,
|
|
|
|
django,
|
|
|
|
colorama,
|
|
|
|
coverage,
|
|
|
|
unidecode,
|
|
|
|
lxml,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "green";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "4.0.2";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-pAZ8P5/CpkTtNfU2ZJUGQzROxGLm0uu1vXS3YpcVprE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
patches = [ ./tests.patch ];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace green/test/test_integration.py \
|
|
|
|
--subst-var-by green "$out/bin/green"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-12-26 17:43:05 +00:00
|
|
|
colorama
|
|
|
|
coverage
|
|
|
|
unidecode
|
|
|
|
lxml
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# let green run it's own test suite
|
|
|
|
checkPhase = ''
|
2021-12-26 17:43:05 +00:00
|
|
|
$out/bin/green -tvvv \
|
|
|
|
green.test.test_version \
|
|
|
|
green.test.test_cmdline \
|
|
|
|
green.test.test_command
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "green" ];
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python test runner";
|
|
|
|
homepage = "https://github.com/CleanCut/green";
|
|
|
|
license = licenses.mit;
|
2021-12-26 17:43:05 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|