Browse Source

jq: disable strptime test on darwin

This seems to fail depending on the machine's configuration, probably
something locale or timezone related.
nixos-19.03
Daiderd Jordan 4 years ago
parent
commit
64e550c31f
No known key found for this signature in database GPG Key ID: D02435D05B810C96
  1. 16
      pkgs/development/tools/jq/darwin-strptime-test.patch
  2. 4
      pkgs/development/tools/jq/default.nix

16
pkgs/development/tools/jq/darwin-strptime-test.patch

@ -0,0 +1,16 @@
diff --git a/tests/jq.test b/tests/jq.test
index 4a4018b..f5aa7d5 100644
--- a/src/tests/jq.test
+++ b/src/tests/jq.test
@@ -1144,9 +1144,9 @@ bsearch(4)
[1,2,3]
-4
-[strptime("%Y-%m-%dT%H:%M:%SZ")|(.,mktime)]
+[strptime("%Y-%m-%dT%H:%M:%SZ")|mktime]
"2015-03-05T23:51:47Z"
-[[2015,2,5,23,51,47,4,63],1425599507]
+[1425599507]
strftime("%Y-%m-%dT%H:%M:%SZ")
[2015,2,5,23,51,47,4,63]

4
pkgs/development/tools/jq/default.nix

@ -24,7 +24,9 @@ stdenv.mkDerivation rec {
url = https://patch-diff.githubusercontent.com/raw/stedolan/jq/pull/1214.diff;
sha256 = "1w8bapnyp56di6p9casbfczfn8258rw0z16grydavdjddfm280l9";
})
];
]
++ stdenv.lib.optional stdenv.isDarwin ./darwin-strptime-test.patch;
patchFlags = [ "-p2" ]; # `src` subdir was introduced after v1.5 was released
configureFlags =

Loading…
Cancel
Save