From 64e550c31f9119cb3e9335c83a5663d8c6bb71e0 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 1 Aug 2018 20:28:49 +0200 Subject: [PATCH] jq: disable strptime test on darwin This seems to fail depending on the machine's configuration, probably something locale or timezone related. --- .../tools/jq/darwin-strptime-test.patch | 16 ++++++++++++++++ pkgs/development/tools/jq/default.nix | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/tools/jq/darwin-strptime-test.patch 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 =