about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGaƩtan Lepage2024-07-29 08:17:56 +0200
committerGitHub2024-07-29 08:17:56 +0200
commit335a118f40ed843deabc95b882dff4b9dc72c4e4 (patch)
tree36ba501e3eeb46a04a33f0ff549ce1bfac67f9a8
parente813c0669261b7514df2be2fce9545de3e8a387c (diff)
parent8989a7038e93d3238110f059d32a9ffb71db9d97 (diff)
Merge pull request #330777 from pyrox0/denose/jsonable
python312Packages.jsonable: drop nose dependency; modernize
-rw-r--r--pkgs/development/python-modules/jsonable/default.nix25
1 files changed, 17 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/jsonable/default.nix b/pkgs/development/python-modules/jsonable/default.nix
index 4dd7c96221e6..705ff95a2d77 100644
--- a/pkgs/development/python-modules/jsonable/default.nix
+++ b/pkgs/development/python-modules/jsonable/default.nix
@@ -2,14 +2,15 @@
   lib,
   buildPythonPackage,
   fetchFromGitHub,
-  nose,
   pytestCheckHook,
+  fetchpatch2,
+  setuptools,
 }:
 
 buildPythonPackage rec {
   pname = "jsonable";
   version = "0.3.1";
-  format = "setuptools";
+  pyproject = true;
 
   src = fetchFromGitHub {
     owner = "halfak";
@@ -18,17 +19,25 @@ buildPythonPackage rec {
     hash = "sha256-3FIzG2djSZOPDdoYeKqs3obQjgHrFtyp0sdBwZakkHA=";
   };
 
-  nativeCheckInputs = [
-    nose
-    pytestCheckHook
+  patches = [
+    # https://github.com/halfak/python-jsonable/pull/2
+    (fetchpatch2 {
+      name = "eq-to-assert.patch";
+      url = "https://github.com/halfak/python-jsonable/pull/2/commits/335e61bb4926e644aef983f7313793bf506d2463.patch";
+      hash = "sha256-tCVA0wG+UMyB6oaNf4nbZ2BPWkNumaGPcjP5VJKegBo=";
+    })
   ];
 
+  build-system = [ setuptools ];
+
+  nativeCheckInputs = [ pytestCheckHook ];
+
   pythonImportsCheck = [ "jsonable" ];
 
-  meta = with lib; {
+  meta = {
     description = "Provides an abstract base class and utilities for defining trivially JSONable python objects";
     homepage = "https://github.com/halfak/python-jsonable";
-    license = licenses.mit;
-    maintainers = with maintainers; [ GaetanLepage ];
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ GaetanLepage ];
   };
 }