2022-09-30 11:47:45 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
|
|
|
, pythonAtLeast
|
|
|
|
, poetry-core
|
|
|
|
|
|
|
|
# propagates
|
|
|
|
, pylev
|
|
|
|
, pastel
|
|
|
|
|
|
|
|
# python36+
|
|
|
|
, crashtest
|
|
|
|
|
|
|
|
# python2
|
|
|
|
, typing
|
|
|
|
, enum34
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "clikit";
|
2020-06-15 15:56:04 +00:00
|
|
|
version = "0.6.2";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sdispater";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-xAsUNhVQBjtSFHyjjnicAKRC3+Tdn3AdGDUYhmOOIdA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml --replace \
|
|
|
|
'crashtest = { version = "^0.3.0", python = "^3.6" }' \
|
|
|
|
'crashtest = { version = "*", python = "^3.6" }'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
pylev
|
|
|
|
pastel
|
2020-08-20 17:08:02 +00:00
|
|
|
]
|
2022-09-30 11:47:45 +00:00
|
|
|
++ lib.optionals (pythonAtLeast "3.6") [ crashtest ]
|
|
|
|
++ lib.optionals isPy27 [ typing enum34 ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"clikit"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/sdispater/clikit";
|
|
|
|
description = "A group of utilities to build beautiful and testable command line interfaces";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jakewaksbaum ];
|
|
|
|
};
|
|
|
|
}
|