2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
ansible-compat,
|
|
|
|
ansible-core,
|
|
|
|
buildPythonPackage,
|
|
|
|
click-help-colors,
|
|
|
|
enrich,
|
|
|
|
fetchPypi,
|
|
|
|
jsonschema,
|
|
|
|
molecule,
|
|
|
|
packaging,
|
|
|
|
pluggy,
|
|
|
|
pythonOlder,
|
|
|
|
rich,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
testers,
|
|
|
|
wcmatch,
|
|
|
|
withPlugins ? true,
|
|
|
|
molecule-plugins,
|
|
|
|
yamllint,
|
2023-10-09 19:29:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "molecule";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "24.7.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.10";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-2yx/pZkj6b8j1hqSpbGdaIHsnuX+lu2enp1wCwJyPwM=";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
ansible-compat
|
|
|
|
ansible-core
|
|
|
|
click-help-colors
|
|
|
|
enrich
|
|
|
|
jsonschema
|
|
|
|
packaging
|
|
|
|
pluggy
|
|
|
|
rich
|
|
|
|
yamllint
|
|
|
|
wcmatch
|
|
|
|
] ++ lib.optional withPlugins molecule-plugins;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "molecule" ];
|
|
|
|
|
|
|
|
# tests can't be easily run without installing things from ansible-galaxy
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
passthru.tests.version =
|
|
|
|
(testers.testVersion {
|
|
|
|
package = molecule;
|
|
|
|
command = "PY_COLORS=0 ${pname} --version";
|
|
|
|
}).overrideAttrs
|
|
|
|
(old: {
|
|
|
|
# workaround the error: Permission denied: '/homeless-shelter'
|
|
|
|
HOME = "$(mktemp -d)";
|
|
|
|
});
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Molecule aids in the development and testing of Ansible roles";
|
|
|
|
homepage = "https://github.com/ansible-community/molecule";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/ansible/molecule/releases/tag/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
license = licenses.mit;
|
2024-04-21 15:54:59 +00:00
|
|
|
maintainers = with maintainers; [ dawidd6 ];
|
|
|
|
mainProgram = "molecule";
|
2023-10-09 19:29:22 +00:00
|
|
|
};
|
|
|
|
}
|