about summary refs log tree commit diff
path: root/pkgs/development/python-modules/spyse-python/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/spyse-python/default.nix')
-rw-r--r--pkgs/development/python-modules/spyse-python/default.nix35
1 files changed, 21 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/spyse-python/default.nix b/pkgs/development/python-modules/spyse-python/default.nix
index 0064454a1eaf8..56ffdfe8c080b 100644
--- a/pkgs/development/python-modules/spyse-python/default.nix
+++ b/pkgs/development/python-modules/spyse-python/default.nix
@@ -7,32 +7,23 @@
 , pythonOlder
 , requests
 , responses
+, setuptools
 }:
 
 buildPythonPackage rec {
   pname = "spyse-python";
   version = "2.2.3";
-  format = "setuptools";
+  pyproject = true;
 
   disabled = pythonOlder "3.8";
 
   src = fetchFromGitHub {
     owner = "spyse-com";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "041k0037anwaxp2mh7mdk8rdsw9hdr3arigyyqfxfn35x8j41c3k";
+    repo = "spyse-python";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-c7BAJOplWNcd9v7FrEZuMHHdMpqtHljF7YpbdQYAMxA=";
   };
 
-  propagatedBuildInputs = [
-    requests
-    dataclasses-json
-    responses
-    limiter
-  ];
-
-  # Tests requires an API token
-  doCheck = false;
-
   patches = [
     # Update limiter import and rate limit, https://github.com/spyse-com/spyse-python/pull/11
     (fetchpatch {
@@ -45,11 +36,26 @@ buildPythonPackage rec {
   postPatch = ''
     substituteInPlace setup.py \
       --replace "'dataclasses~=0.6'," "" \
+      --replace "dataclasses-json~=0.5.4" "dataclasses-json>=0.5.4" \
       --replace "responses~=0.13.3" "responses>=0.13.3" \
       --replace "limiter~=0.1.2" "limiter>=0.1.2" \
       --replace "requests~=2.26.0" "requests>=2.26.0"
   '';
 
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  propagatedBuildInputs = [
+    requests
+    dataclasses-json
+    responses
+    limiter
+  ];
+
+  # Tests requires an API token
+  doCheck = false;
+
   pythonImportsCheck = [
     "spyse"
   ];
@@ -57,6 +63,7 @@ buildPythonPackage rec {
   meta = with lib; {
     description = "Python module for spyse.com API";
     homepage = "https://github.com/spyse-com/spyse-python";
+    changelog = "https://github.com/spyse-com/spyse-python/releases/tag/v${version}";
     license = with licenses; [ mit ];
     maintainers = with maintainers; [ fab ];
   };