From 96f0d3b9084bd1949f9b2b79e11ee7ee35bac084 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 3 Jan 2018 08:18:48 -0600 Subject: [PATCH 1/2] ncurses: simplify patch expr, fix ncurses6 build w/clang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Somewhat amusingly given its name, "clang.patch" applies to both 5 and 6 but is the cause of ncurses6 breakage on 6 but is required on 5... gcc is happy in all four configurations: 5 5p 6 6p gcc ✓ ✓ ✓ ✓ clang ✗ ✓ ✓ ✗ Which is why this commit enables the patch for 5 but not 6; this matches behavior in Gentoo, for example. For further simplification, we also use gcc-5 patch regardless. --- pkgs/development/libraries/ncurses/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 79414f016d3..ae875faddd7 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { sha256 = "11adzj0k82nlgpfrflabvqn2m7fmhp2y6pd7ivmapynxqb9vvb92"; }); - patches = [ ./clang.patch ] ++ lib.optional (abiVersion == "5" && stdenv.cc.isGNU) ./gcc-5.patch; + patches = lib.optionals (abiVersion == "5") [ ./clang.patch ./gcc-5.patch ]; outputs = [ "out" "dev" "man" ]; setOutputFlags = false; # some aren't supported From 48a5212c15864dc8804133a53b28e43cb7a59050 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 3 Jan 2018 08:43:34 -0600 Subject: [PATCH 2/2] ncurses: use more complicated expression to avoid mass-rebuilds, note --- pkgs/development/libraries/ncurses/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index ae875faddd7..675756509c8 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -22,7 +22,9 @@ stdenv.mkDerivation rec { sha256 = "11adzj0k82nlgpfrflabvqn2m7fmhp2y6pd7ivmapynxqb9vvb92"; }); - patches = lib.optionals (abiVersion == "5") [ ./clang.patch ./gcc-5.patch ]; + # Unnecessarily complicated in order to avoid mass-rebuilds + patches = lib.optional (!stdenv.cc.isClang || abiVersion == "5") ./clang.patch + ++ lib.optional (stdenv.cc.isGNU && abiVersion == "5") ./gcc-5.patch; outputs = [ "out" "dev" "man" ]; setOutputFlags = false; # some aren't supported