1{ lib
2, buildPythonPackage
3, fetchPypi
4, ansible-compat
5, ansible-core
6, click-help-colors
7, enrich
8, jsonschema
9, withPlugins ? true, molecule-plugins
10, packaging
11, pluggy
12, rich
13, setuptools
14, setuptools-scm
15, yamllint
16, wcmatch
17, wheel
18}:
19
20buildPythonPackage rec {
21 pname = "molecule";
22 version = "6.0.2";
23 format = "pyproject";
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-uRk1P3mXRt5gsWonV1YneD45wmj98vKqA3LwFix7VHg=";
28 };
29
30 nativeBuildInputs = [
31 setuptools
32 setuptools-scm
33 wheel
34 ];
35
36 propagatedBuildInputs = [
37 ansible-compat
38 ansible-core
39 click-help-colors
40 enrich
41 jsonschema
42 packaging
43 pluggy
44 rich
45 yamllint
46 wcmatch
47 ] ++ lib.optional withPlugins molecule-plugins;
48
49 pythonImportsCheck = [ "molecule" ];
50
51 # tests can't be easily run without installing things from ansible-galaxy
52 doCheck = false;
53
54 meta = with lib; {
55 description = "Molecule aids in the development and testing of Ansible roles";
56 homepage = "https://github.com/ansible-community/molecule";
57 maintainers = with maintainers; [ dawidd6 ];
58 license = licenses.mit;
59 };
60}