2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPy3k
|
|
|
|
, fetchPypi
|
2021-12-26 17:43:05 +00:00
|
|
|
, django
|
2020-04-24 23:36:52 +00:00
|
|
|
, colorama
|
|
|
|
, coverage
|
|
|
|
, unidecode
|
2021-09-18 10:52:07 +00:00
|
|
|
, lxml
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "green";
|
2022-01-22 01:22:15 +00:00
|
|
|
version = "3.4.0";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-22 01:22:15 +00:00
|
|
|
sha256 = "6325681c94afd0f225c7ea2dcfedfde88c859d60da384d54c9ee70b91e434b14";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
patches = [
|
|
|
|
./tests.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"green"
|
|
|
|
];
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|