diff --git a/pkgs/development/tools/jq/darwin-strptime-test.patch b/pkgs/development/tools/jq/darwin-strptime-test.patch new file mode 100644 index 000000000000..4ea83fc164a3 --- /dev/null +++ b/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] diff --git a/pkgs/development/tools/jq/default.nix b/pkgs/development/tools/jq/default.nix index 93c465ce844a..712ec64bd416 100644 --- a/pkgs/development/tools/jq/default.nix +++ b/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 =