From 96f0d3b9084bd1949f9b2b79e11ee7ee35bac084 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 3 Jan 2018 08:18:48 -0600 Subject: [PATCH] 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 79414f016d39..ae875faddd72 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