nixpkgs/pkgs/tools/admin/ansible/doctor.nix
2023-05-16 01:20:14 +02:00

61 lines
1.3 KiB
Nix

{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "ansible-doctor";
version = "2.0.4";
format = "pyproject";
src = fetchFromGitHub {
owner = "thegeeklab";
repo = "ansible-doctor";
rev = "refs/tags/v${version}";
hash = "sha256-nZv1PdR0kGrke2AjcDWjDWBdsw64UpHYFNDFAe/UoJo=";
};
pythonRelaxDeps = true;
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'version = "0.0.0"' 'version = "${version}"'
'';
nativeBuildInputs = with python3.pkgs; [
poetry-core
pythonRelaxDepsHook
];
propagatedBuildInputs = with python3.pkgs; [
anyconfig
appdirs
colorama
environs
jinja2
jsonschema
nested-lookup
pathspec
python-json-logger
ruamel-yaml
];
postInstall = ''
rm $out/lib/python*/site-packages/LICENSE
'';
# Module has no tests
doCheck = false;
pythonImportsCheck = [
"ansibledoctor"
];
meta = with lib; {
description = "Annotation based documentation for your Ansible roles";
homepage = "https://github.com/thegeeklab/ansible-doctor";
changelog = "https://github.com/thegeeklab/ansible-doctor/releases/tag/v${version}";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ tboerger ];
};
}