2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
autopage,
|
|
|
|
cmd2,
|
|
|
|
importlib-metadata,
|
|
|
|
installShellFiles,
|
|
|
|
openstackdocstheme,
|
|
|
|
pbr,
|
|
|
|
prettytable,
|
|
|
|
pyparsing,
|
|
|
|
pyyaml,
|
|
|
|
stevedore,
|
|
|
|
sphinx,
|
|
|
|
callPackage,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cliff";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "4.7.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-bKRfjfUZu8ByLGEEnee35EKkZfp/P1Urltc1+ib9WyY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
# only a small portion of the listed packages are actually needed for running the tests
|
|
|
|
# so instead of removing them one by one remove everything
|
|
|
|
rm test-requirements.txt
|
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
openstackdocstheme
|
|
|
|
sphinx
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
autopage
|
|
|
|
cmd2
|
2022-09-30 11:47:45 +00:00
|
|
|
importlib-metadata
|
2020-04-24 23:36:52 +00:00
|
|
|
pbr
|
|
|
|
prettytable
|
|
|
|
pyparsing
|
|
|
|
pyyaml
|
2021-09-18 10:52:07 +00:00
|
|
|
stevedore
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
postInstall = ''
|
|
|
|
sphinx-build -a -E -d doc/build/doctrees -b man doc/source doc/build/man
|
|
|
|
installManPage doc/build/man/cliff.1
|
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# check in passthru.tests.pytest to escape infinite recursion with stestr
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
pythonImportsCheck = [ "cliff" ];
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
pytest = callPackage ./tests.nix { };
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Command Line Interface Formulation Framework";
|
2021-09-18 10:52:07 +00:00
|
|
|
homepage = "https://github.com/openstack/cliff";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
2021-09-18 10:52:07 +00:00
|
|
|
maintainers = teams.openstack.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|