about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authornatsukium <tomoya.otabi@gmail.com>2023-11-05 14:40:49 +0900
committerJörg Thalheim <Mic92@users.noreply.github.com>2023-11-05 13:05:34 +0100
commit0048cdae9c72a7aca0ad3002329323134fc161b3 (patch)
treede97aa4351be7681f55786d634319519125e0f04 /pkgs
parent713db975bb5128f97e11be2b123d794d9deff1be (diff)
python311Packages.x11-hash: refactor
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/x11-hash/default.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/x11-hash/default.nix b/pkgs/development/python-modules/x11-hash/default.nix
index dc5b28fbfb70c..403f1ed3e12f1 100644
--- a/pkgs/development/python-modules/x11-hash/default.nix
+++ b/pkgs/development/python-modules/x11-hash/default.nix
@@ -1,23 +1,36 @@
 { lib
 , buildPythonPackage
 , fetchPypi
+, setuptools
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   version = "1.4";
   pname = "x11-hash";
+  pyproject = true;
 
   src = fetchPypi {
     pname = "x11_hash";
     inherit version;
-    sha256 = "172skm9xbbrivy1p4xabxihx9lsnzi53hvzryfw64m799k2fmp22";
+    hash = "sha256-QtzqxEzpVGK48/lvOEr8VtPUYexLdXKD3zGv1VOdWpw=";
   };
 
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  # pypi's source doesn't include tests
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "x11_hash"
+  ];
+
   meta = with lib; {
     description = "Binding for X11 proof of work hashing";
     homepage = "https://github.com/mazaclub/x11_hash";
     license = licenses.mit;
     maintainers = with maintainers; [ np ];
   };
-
 }