2022-03-28 09:03:40 +00:00
|
|
|
{ lib
|
2022-07-20 11:44:36 +00:00
|
|
|
, ansible
|
|
|
|
, ansible-core
|
2022-03-22 15:05:26 +00:00
|
|
|
, anyconfig
|
|
|
|
, appdirs
|
2022-03-28 09:03:40 +00:00
|
|
|
, buildPythonPackage
|
2022-03-22 15:05:26 +00:00
|
|
|
, colorama
|
2022-03-28 09:03:40 +00:00
|
|
|
, fetchFromGitHub
|
2022-03-22 15:05:26 +00:00
|
|
|
, flake8
|
|
|
|
, jsonschema
|
|
|
|
, nested-lookup
|
2022-03-28 09:03:40 +00:00
|
|
|
, pathspec
|
2022-03-22 15:05:26 +00:00
|
|
|
, poetry-core
|
2022-03-28 09:03:40 +00:00
|
|
|
, pytest-mock
|
2022-03-22 15:05:26 +00:00
|
|
|
, python-json-logger
|
2022-03-28 09:03:40 +00:00
|
|
|
, pytestCheckHook
|
2022-12-20 08:18:22 +00:00
|
|
|
, pythonRelaxDepsHook
|
2022-03-28 09:03:40 +00:00
|
|
|
, pythonOlder
|
2022-03-22 15:05:26 +00:00
|
|
|
, pyyaml
|
|
|
|
, toolz
|
|
|
|
, unidiff
|
|
|
|
, yamllint
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ansible-later";
|
2023-04-15 17:52:24 +00:00
|
|
|
version = "3.2.2";
|
2022-03-22 15:05:26 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-03-28 09:03:40 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
2022-03-22 15:05:26 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "thegeeklab";
|
2022-03-28 09:03:40 +00:00
|
|
|
repo = pname;
|
2022-04-26 09:15:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-04-15 17:52:24 +00:00
|
|
|
hash = "sha256-kqvWrNygriFG+jVjezJNe5CwUix38Ge0hQgu351Qyjw=";
|
2022-03-22 15:05:26 +00:00
|
|
|
};
|
|
|
|
|
2022-07-20 11:44:36 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'version = "0.0.0"' 'version = "${version}"' \
|
2022-12-20 08:18:22 +00:00
|
|
|
--replace " --cov=ansiblelater --cov-report=xml:coverage.xml --cov-report=term --cov-append --no-cov-on-fail" ""
|
2022-07-20 11:44:36 +00:00
|
|
|
'';
|
|
|
|
|
2022-12-20 08:18:22 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"flake8"
|
|
|
|
"jsonschema"
|
|
|
|
"pathspec"
|
|
|
|
"python-json-logger"
|
|
|
|
"pyyaml"
|
|
|
|
"toolz"
|
|
|
|
"unidiff"
|
|
|
|
"yamllint"
|
|
|
|
];
|
|
|
|
|
2022-03-22 15:05:26 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2022-12-20 08:18:22 +00:00
|
|
|
pythonRelaxDepsHook
|
2022-03-22 15:05:26 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-07-20 11:44:36 +00:00
|
|
|
ansible
|
|
|
|
ansible-core
|
2022-03-22 15:05:26 +00:00
|
|
|
anyconfig
|
|
|
|
appdirs
|
|
|
|
colorama
|
|
|
|
flake8
|
|
|
|
jsonschema
|
|
|
|
nested-lookup
|
2022-03-28 09:03:40 +00:00
|
|
|
pathspec
|
2022-03-22 15:05:26 +00:00
|
|
|
python-json-logger
|
|
|
|
pyyaml
|
|
|
|
toolz
|
|
|
|
unidiff
|
|
|
|
yamllint
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-03-28 09:03:40 +00:00
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
rm $out/lib/python*/site-packages/LICENSE
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ansiblelater"
|
|
|
|
];
|
2022-03-22 15:05:26 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-03-28 09:03:40 +00:00
|
|
|
description = "Best practice scanner for Ansible roles and playbooks";
|
2022-03-22 15:05:26 +00:00
|
|
|
homepage = "https://github.com/thegeeklab/ansible-later";
|
2022-12-20 08:09:54 +00:00
|
|
|
changelog = "https://github.com/thegeeklab/ansible-later/releases/tag/v${version}";
|
2022-03-22 15:05:26 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ tboerger ];
|
|
|
|
};
|
|
|
|
}
|