about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/molecule/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/molecule/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/molecule/default.nix14
1 files changed, 12 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/molecule/default.nix b/nixpkgs/pkgs/development/python-modules/molecule/default.nix
index da881f658675..6b46ae62258c 100644
--- a/nixpkgs/pkgs/development/python-modules/molecule/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/molecule/default.nix
@@ -1,11 +1,13 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, testers
 , ansible-compat
 , ansible-core
 , click-help-colors
 , enrich
 , jsonschema
+, molecule
 , withPlugins ? true, molecule-plugins
 , packaging
 , pluggy
@@ -19,12 +21,12 @@
 
 buildPythonPackage rec {
   pname = "molecule";
-  version = "6.0.3";
+  version = "24.2.0";
   format = "pyproject";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-0qiBBi/MXvHgjB5RJ8BDVNLJUXGVXicL2Cs/v+9y07A=";
+    hash = "sha256-R8mCp9Bdt4Rtp3/nFZ3rlG8myvsuOI/HGBK+AImkF3Y=";
   };
 
   nativeBuildInputs = [
@@ -51,6 +53,14 @@ buildPythonPackage rec {
   # tests can't be easily run without installing things from ansible-galaxy
   doCheck = false;
 
+  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)";
+  });
+
   meta = with lib; {
     description = "Molecule aids in the development and testing of Ansible roles";
     homepage = "https://github.com/ansible-community/molecule";