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-09-22 12:36:57 +00:00
|
|
|
version = "1.4.4";
|
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";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-09-22 12:36:57 +00:00
|
|
|
hash = "sha256-blCBlSCp7W6tlCa5381ex7yq37iY9v6u7ITHmJEUxl0=";
|
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-09-22 12:36:57 +00:00
|
|
|
--replace 'jsonschema = "4.15.0"' 'jsonschema = "*"' \
|
|
|
|
--replace 'nested-lookup = "0.2.25"' 'nested-lookup = "*"' \
|
|
|
|
--replace 'pathspec = "0.10.1"' 'pathspec = "*"'
|
2022-03-30 09:31:56 +00:00
|
|
|
'';
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|