nixpkgs/pkgs/development/python-modules/green/default.nix

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

59 lines
1010 B
Nix
Raw Normal View History

2021-09-17 03:42:24 +00:00
{ lib
, buildPythonPackage
, pythonOlder
2021-09-17 03:42:24 +00:00
, fetchPypi
, django
2019-10-17 16:17:05 +00:00
, colorama
, coverage
, unidecode
2021-09-17 03:42:24 +00:00
, lxml
2019-10-17 16:17:05 +00:00
}:
2018-02-20 00:16:31 +00:00
buildPythonPackage rec {
pname = "green";
version = "3.4.3";
format = "setuptools";
2018-02-20 00:16:31 +00:00
disabled = pythonOlder "3.7";
2020-09-11 13:06:04 +00:00
2018-02-20 00:16:31 +00:00
src = fetchPypi {
inherit pname version;
hash = "sha256-iGXQt3tcsThR3WAaWK0sgry1LafKEG8FOMV4fxJzaKY=";
2018-02-20 00:16:31 +00:00
};
2021-09-17 03:42:24 +00:00
patches = [
./tests.patch
];
postPatch = ''
substituteInPlace green/test/test_integration.py \
--subst-var-by green "$out/bin/green"
'';
2018-02-20 00:16:31 +00:00
propagatedBuildInputs = [
colorama
coverage
unidecode
lxml
2020-09-11 13:06:04 +00:00
];
2018-02-20 00:16:31 +00:00
2019-10-17 16:17:05 +00:00
# let green run it's own test suite
checkPhase = ''
$out/bin/green -tvvv \
green.test.test_version \
green.test.test_cmdline \
green.test.test_command
2019-10-17 16:17:05 +00:00
'';
pythonImportsCheck = [
"green"
];
2018-02-20 00:16:31 +00:00
meta = with lib; {
description = "Python test runner";
homepage = "https://github.com/CleanCut/green";
2018-02-20 00:16:31 +00:00
license = licenses.mit;
maintainers = with maintainers; [ ];
2018-02-20 00:16:31 +00:00
};
}