2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-09-18 10:52:07 +00:00
|
|
|
, autopage
|
|
|
|
, cmd2
|
2022-09-30 11:47:45 +00:00
|
|
|
, importlib-metadata
|
2022-02-10 20:34:41 +00:00
|
|
|
, installShellFiles
|
|
|
|
, openstackdocstheme
|
2020-04-24 23:36:52 +00:00
|
|
|
, pbr
|
|
|
|
, prettytable
|
|
|
|
, pyparsing
|
|
|
|
, pyyaml
|
2021-09-18 10:52:07 +00:00
|
|
|
, stevedore
|
2022-02-10 20:34:41 +00:00
|
|
|
, sphinx
|
2021-09-18 10:52:07 +00:00
|
|
|
, callPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cliff";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "4.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-u+6CEnMIRyoxI+0QtSiWFsssQ1B0ZW3QcuVTYwU9CRw=";
|
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
|
|
|
};
|
|
|
|
}
|