about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Schütz <nix@dotlambda.de>2024-02-01 17:59:40 +0000
committerGitHub <noreply@github.com>2024-02-01 12:59:40 -0500
commitedd178ba61d88cf2dc6c4ab253173d0ee201251a (patch)
tree613aad0cf1575816b06b8e5c899228d607dea9b9
parent185df8fe57ce01f534d0b90303c78c4af44e5cd9 (diff)
python311Packages.jq: 1.5.0 -> 1.6.0, clean up, skip failing test (#285321)
(cherry picked from commit 27a1884313d9ab2afc4553791a310532a6807b95)

Co-authored-by: K900 <me@0upti.me>
-rw-r--r--pkgs/development/python-modules/jq/default.nix22
1 files changed, 10 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/jq/default.nix b/pkgs/development/python-modules/jq/default.nix
index d7dc37b068528..5b369d513cb13 100644
--- a/pkgs/development/python-modules/jq/default.nix
+++ b/pkgs/development/python-modules/jq/default.nix
@@ -2,15 +2,15 @@
 , buildPythonPackage
 , cython
 , fetchFromGitHub
-, fetchpatch
 , jq
+, oniguruma
 , pytestCheckHook
 , pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "jq";
-  version = "1.5.0";
+  version = "1.6.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.7";
@@ -19,18 +19,10 @@ buildPythonPackage rec {
     owner = "mwilliamson";
     repo = "jq.py";
     rev = "refs/tags/${version}";
-    hash = "sha256-mITk5y2AdUc9kZ/WrsnHxS1GRRmO4FDbPRgTtV2gIXI=";
+    hash = "sha256-c6tJI/mPlBGIYTk5ObIQ1CUTq73HouQ2quMZVWG8FFg=";
   };
 
-  patches = [
-    # Removes vendoring
-    ./jq-py-setup.patch
-    (fetchpatch {
-      url = "https://github.com/mwilliamson/jq.py/commit/805705dde4beb9db9a1743663d415198fb02eb1a.patch";
-      includes = [ "tests/*" ];
-      hash = "sha256-AgdpwmtOTeJ4nSbM6IknKaIVqqtWkpxTTtblXjlbWeA=";
-    })
-  ];
+  env.JQPY_USE_SYSTEM_LIBS = 1;
 
   nativeBuildInputs = [
     cython
@@ -38,6 +30,7 @@ buildPythonPackage rec {
 
   buildInputs = [
     jq
+    oniguruma
   ];
 
   preBuild = ''
@@ -48,6 +41,11 @@ buildPythonPackage rec {
     pytestCheckHook
   ];
 
+  disabledTests = [
+    # intentional behavior change in jq 1.7.1 not reflected upstream
+    "test_given_json_text_then_strings_containing_null_characters_are_preserved"
+  ];
+
   pythonImportsCheck = [
     "jq"
   ];