From 0048cdae9c72a7aca0ad3002329323134fc161b3 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 5 Nov 2023 14:40:49 +0900 Subject: [PATCH] python311Packages.x11-hash: refactor --- .../python-modules/x11-hash/default.nix | 17 +++++++++++++++-- 1 file 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 dc5b28fbfb70..403f1ed3e12f 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 ]; }; - }