2022-03-22 18:05:26 +03:00
|
|
|
{ buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
|
|
|
|
# pythonPackages
|
|
|
|
, anyconfig
|
|
|
|
, appdirs
|
|
|
|
, colorama
|
|
|
|
, flake8
|
|
|
|
, jsonschema
|
|
|
|
, nested-lookup
|
|
|
|
, poetry-core
|
|
|
|
, python-json-logger
|
|
|
|
, pyyaml
|
|
|
|
, toolz
|
|
|
|
, unidiff
|
|
|
|
, yamllint
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ansible-later";
|
2022-03-28 11:17:53 +03:00
|
|
|
version = "2.0.8";
|
2022-03-22 18:05:26 +03:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thegeeklab";
|
|
|
|
repo = "ansible-later";
|
|
|
|
rev = "v${version}";
|
2022-03-28 11:17:53 +03:00
|
|
|
sha256 = "sha256-oPlm9uxyN3hyf4gFv37YWEn/HOkg0QQ1Ya3tjLd53rQ=";
|
2022-03-22 18:05:26 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm $out/lib/python*/site-packages/LICENSE
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'PyYAML = "6.0"' 'PyYAML = "*"' \
|
|
|
|
--replace 'unidiff = "0.7.3"' 'unidiff = "*"' \
|
|
|
|
--replace 'jsonschema = "4.4.0"' 'jsonschema = "*"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
anyconfig
|
|
|
|
appdirs
|
|
|
|
colorama
|
|
|
|
flake8
|
|
|
|
jsonschema
|
|
|
|
nested-lookup
|
|
|
|
python-json-logger
|
|
|
|
pyyaml
|
|
|
|
toolz
|
|
|
|
unidiff
|
|
|
|
yamllint
|
|
|
|
];
|
|
|
|
|
|
|
|
# no tests
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "ansiblelater" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Another best practice scanner for Ansible roles and playbooks";
|
|
|
|
homepage = "https://github.com/thegeeklab/ansible-later";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ tboerger ];
|
|
|
|
};
|
|
|
|
}
|