2021-04-26 19:14:03 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, six
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytest-mypy
|
2021-04-26 19:14:03 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-utils";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "3.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "WoLpH";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-+NgcVIDM9f2OKBpJNWlSyFxEONltPWJSWIu400/5RkQ=
|
|
|
|
";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
# disable coverage and linting
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2021-04-26 19:14:03 +00:00
|
|
|
sed -i '/--cov/d' pytest.ini
|
|
|
|
sed -i '/--flake8/d' pytest.ini
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
checkInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytest-mypy
|
2021-04-26 19:14:03 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"_python_utils_tests"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module with some convenient utilities";
|
|
|
|
homepage = "https://github.com/WoLpH/python-utils";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|