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 04:42:24 +01:00
{ lib
, buildPythonPackage
, isPy3k
, fetchPypi
, django
2019-10-17 17:17:05 +01:00
, colorama
, coverage
, unidecode
2021-09-17 04:42:24 +01:00
, lxml
2019-10-17 17:17:05 +01:00
}:
2018-02-20 00:16:31 +00:00
buildPythonPackage rec {
pname = "green";
2022-01-21 16:28:56 +00:00
version = "3.4.1";
format = "setuptools";
2018-02-20 00:16:31 +00:00
2020-09-11 14:06:04 +01:00
disabled = !isPy3k;
2018-02-20 00:16:31 +00:00
src = fetchPypi {
inherit pname version;
2022-01-21 16:28:56 +00:00
sha256 = "5dda2d2a277012227011f8f21523d70a550ebe5d47cc890fa16b9fcd9a91da53";
2018-02-20 00:16:31 +00:00
};
2021-09-17 04:42:24 +01: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 14:06:04 +01:00
];
2018-02-20 00:16:31 +00:00
2019-10-17 17:17:05 +01: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 17:17:05 +01: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
};
}