about summary refs log tree commit diff
path: root/pkgs/development/python-modules/hid/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/hid/default.nix')
-rw-r--r--pkgs/development/python-modules/hid/default.nix27
1 files changed, 16 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/hid/default.nix b/pkgs/development/python-modules/hid/default.nix
index deb4006dfe78a..e1232bc85934c 100644
--- a/pkgs/development/python-modules/hid/default.nix
+++ b/pkgs/development/python-modules/hid/default.nix
@@ -1,30 +1,35 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, hidapi
-, nose
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  setuptools,
+  hidapi,
 }:
 
 buildPythonPackage rec {
   pname = "hid";
   version = "1.0.6";
-  format = "setuptools";
+  pyproject = true;
 
   src = fetchPypi {
     inherit pname version;
     hash = "sha256-SNdk166XRroSO5bb9FeJPKgCaLd5HEsdLgUTEO64OGA=";
   };
 
-  propagatedBuildInputs = [ hidapi ];
-
-  nativeCheckInputs = [ nose ];
-
- postPatch = ''
+  postPatch = ''
     hidapi=${hidapi}/lib/
     test -d $hidapi || { echo "ERROR: $hidapi doesn't exist, please update/fix this build expression."; exit 1; }
     sed -i -e "s|libhidapi|$hidapi/libhidapi|" hid/__init__.py
   '';
 
+  build-system = [ setuptools ];
+
+  dependencies = [ hidapi ];
+
+  doCheck = false; # no tests
+
+  pythonImportsCheck = [ "hid" ];
+
   meta = with lib; {
     description = "hidapi bindings in ctypes";
     homepage = "https://github.com/apmorton/pyhidapi";