diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 798be764047c..1161d2dafd5c 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -123,7 +123,9 @@ stdenv.mkDerivation (finalAttrs: { ]; # Only the C compiler, and explicitly not C++ compiler needs this flag on solaris: - CFLAGS = lib.optionalString stdenv.hostPlatform.isSunOS "-D_XOPEN_SOURCE_EXTENDED"; + env = lib.optionalAttrs stdenv.hostPlatform.isSunOS { + CFLAGS = "-D_XOPEN_SOURCE_EXTENDED"; + }; strictDeps = true;