2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
2022-03-30 09:31:56 +00:00
|
|
|
, anyconfig
|
|
|
|
, appdirs
|
2022-04-27 09:35:20 +00:00
|
|
|
, buildPythonPackage
|
2022-03-30 09:31:56 +00:00
|
|
|
, colorama
|
|
|
|
, environs
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-30 09:31:56 +00:00
|
|
|
, jinja2
|
|
|
|
, jsonschema
|
|
|
|
, nested-lookup
|
|
|
|
, pathspec
|
|
|
|
, poetry-core
|
|
|
|
, python-json-logger
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonOlder
|
2022-03-30 09:31:56 +00:00
|
|
|
, ruamel-yaml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ansible-doctor";
|
2022-04-27 09:35:20 +00:00
|
|
|
version = "1.3.0";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thegeeklab";
|
|
|
|
repo = "ansible-doctor";
|
|
|
|
rev = "v${version}";
|
2022-04-27 09:35:20 +00:00
|
|
|
hash = "sha256-lJKJE9UccknQg8aqt/6qmjKKaICBxaCH5e8fdmie6u8=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
anyconfig
|
|
|
|
appdirs
|
|
|
|
colorama
|
|
|
|
environs
|
|
|
|
jinja2
|
|
|
|
jsonschema
|
|
|
|
nested-lookup
|
|
|
|
pathspec
|
|
|
|
python-json-logger
|
|
|
|
ruamel-yaml
|
|
|
|
];
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
postInstall = ''
|
|
|
|
rm $out/lib/python*/site-packages/LICENSE
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-04-27 09:35:20 +00:00
|
|
|
--replace 'version = "0.0.0"' 'version = "${version}"' \
|
|
|
|
--replace 'Jinja2 = "3.1.2"' 'Jinja2 = "*"' \
|
|
|
|
--replace 'anyconfig = "0.13.0"' 'anyconfig = "*"' \
|
2022-03-30 09:31:56 +00:00
|
|
|
--replace 'environs = "9.5.0"' 'environs = "*"' \
|
|
|
|
--replace 'jsonschema = "4.4.0"' 'jsonschema = "*"' \
|
|
|
|
--replace '"ruamel.yaml" = "0.17.21"' '"ruamel.yaml" = "*"'
|
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# Module has no tests
|
|
|
|
doCheck = false;
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"ansibledoctor"
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Annotation based documentation for your Ansible roles";
|
|
|
|
homepage = "https://github.com/thegeeklab/ansible-doctor";
|
|
|
|
license = licenses.lgpl3Only;
|
|
|
|
maintainers = with maintainers; [ tboerger ];
|
|
|
|
};
|
|
|
|
}
|