about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ansible-runner/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/ansible-runner/default.nix')
-rw-r--r--pkgs/development/python-modules/ansible-runner/default.nix92
1 files changed, 50 insertions, 42 deletions
diff --git a/pkgs/development/python-modules/ansible-runner/default.nix b/pkgs/development/python-modules/ansible-runner/default.nix
index e4cb4c205d257..2bc07dd1277f4 100644
--- a/pkgs/development/python-modules/ansible-runner/default.nix
+++ b/pkgs/development/python-modules/ansible-runner/default.nix
@@ -1,30 +1,32 @@
-{ lib
-, stdenv
-, ansible-core
-, buildPythonPackage
-, fetchPypi
-, fetchpatch
-, glibcLocales
-, importlib-metadata
-, mock
-, openssh
-, pbr
-, pexpect
-, psutil
-, pytest-mock
-, pytest-timeout
-, pytest-xdist
-, pytestCheckHook
-, pythonOlder
-, python-daemon
-, pyyaml
-, six
+{
+  lib,
+  stdenv,
+  ansible-core,
+  buildPythonPackage,
+  fetchPypi,
+  fetchpatch,
+  glibcLocales,
+  importlib-metadata,
+  mock,
+  openssh,
+  pbr,
+  pexpect,
+  psutil,
+  pytest-mock,
+  pytest-timeout,
+  pytest-xdist,
+  pytestCheckHook,
+  pythonOlder,
+  python-daemon,
+  pyyaml,
+  setuptools,
+  six,
 }:
 
 buildPythonPackage rec {
   pname = "ansible-runner";
   version = "2.3.6";
-  format = "setuptools";
+  pyproject = true;
 
   disabled = pythonOlder "3.8";
 
@@ -38,24 +40,31 @@ buildPythonPackage rec {
       name = "fix-tests.patch";
       url = "https://github.com/ansible/ansible-runner/commit/0d522c90cfc1f305e118705a1b3335ccb9c1633d.patch";
       hash = "sha256-eTnQkftvjK0YHU+ovotRVSuVlvaVeXp5SvYk1DPCg88=";
-      excludes = [ ".github/workflows/ci.yml" "tox.ini" ];
+      excludes = [
+        ".github/workflows/ci.yml"
+        "tox.ini"
+      ];
+    })
+    (fetchpatch {
+      # python 3.12 compat
+      url = "https://github.com/ansible/ansible-runner/commit/dc248497bb2375a363222ce755bf3a31f21d5f64.patch";
+      hash = "sha256-QT28Iw0uENoO35rqZpYBcmJB/GNDEF4m86SKf6p0XQU=";
     })
   ];
 
-  nativeBuildInputs = [
+  build-system = [
+    setuptools
     pbr
   ];
 
-  propagatedBuildInputs = [
+  dependencies = [
     ansible-core
     psutil
     pexpect
     python-daemon
     pyyaml
     six
-  ] ++ lib.optionals (pythonOlder "3.10") [
-    importlib-metadata
-  ];
+  ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ];
 
   nativeCheckInputs = [
     ansible-core # required to place ansible CLI onto the PATH in tests
@@ -85,21 +94,20 @@ buildPythonPackage rec {
     "test_validate_pattern"
   ];
 
-  disabledTestPaths = [
-    # These tests unset PATH and then run executables like `bash` (see https://github.com/ansible/ansible-runner/pull/918)
-    "test/integration/test_runner.py"
-    "test/unit/test_runner.py"
-  ]
-  ++ lib.optionals stdenv.isDarwin [
-    # Integration tests on Darwin are not regularly passing in ansible-runner's own CI
-    "test/integration"
-    # These tests write to `/tmp` which is not writable on Darwin
-    "test/unit/config/test__base.py"
-  ];
+  disabledTestPaths =
+    [
+      # These tests unset PATH and then run executables like `bash` (see https://github.com/ansible/ansible-runner/pull/918)
+      "test/integration/test_runner.py"
+      "test/unit/test_runner.py"
+    ]
+    ++ lib.optionals stdenv.isDarwin [
+      # Integration tests on Darwin are not regularly passing in ansible-runner's own CI
+      "test/integration"
+      # These tests write to `/tmp` which is not writable on Darwin
+      "test/unit/config/test__base.py"
+    ];
 
-  pythonImportsCheck = [
-    "ansible_runner"
-  ];
+  pythonImportsCheck = [ "ansible_runner" ];
 
   meta = with lib; {
     description = "Helps when interfacing with Ansible";