about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ds4drv/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/ds4drv/default.nix')
-rw-r--r--pkgs/development/python-modules/ds4drv/default.nix25
1 files changed, 20 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/ds4drv/default.nix b/pkgs/development/python-modules/ds4drv/default.nix
index ab08f7b9c2ed..d4ebc468f9ef 100644
--- a/pkgs/development/python-modules/ds4drv/default.nix
+++ b/pkgs/development/python-modules/ds4drv/default.nix
@@ -1,12 +1,19 @@
-{ lib, fetchFromGitHub, buildPythonPackage
-, evdev, pyudev
-, bluez
+{
+  lib,
+  fetchFromGitHub,
+  buildPythonPackage,
+  evdev,
+  pyudev,
+  bluez,
+  setuptools,
 }:
 
 buildPythonPackage rec {
   pname = "ds4drv";
   version = "0.5.1";
-  format = "setuptools";
+
+  pyproject = true;
+  build-system = [ setuptools ];
 
   # PyPi only carries py3 wheel
   src = fetchFromGitHub {
@@ -16,7 +23,15 @@ buildPythonPackage rec {
     sha256 = "0vinpla0apizzykcyfis79mrm1i6fhns83nkzw85svypdhkx2g8v";
   };
 
-  propagatedBuildInputs = [ evdev pyudev ];
+  postPatch = ''
+    substituteInPlace ds4drv/config.py \
+      --replace-fail SafeConfigParser ConfigParser
+  '';
+
+  dependencies = [
+    evdev
+    pyudev
+  ];
 
   buildInputs = [ bluez ];