diff options
Diffstat (limited to 'pkgs/development/libraries/gettext/default.nix')
-rw-r--r-- | pkgs/development/libraries/gettext/default.nix | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index abb692aebc1e..2a69b5702172 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -19,13 +19,22 @@ stdenv.mkDerivation rec { # fix reproducibile output, in particular in the grub2 build # https://savannah.gnu.org/bugs/index.php?59658 ./0001-msginit-Do-not-use-POT-Creation-Date.patch - ]; + ] + # An accidental inclusion in https://marc.info/?l=glibc-alpha&m=150511271003225&w=2 + # resulted in a getcwd prototype to be added in when it isn't needed. + # Clang does not like this unless the "overridable" attribute was appied. + # Since we don't need to redeclare getcwd, we can just remove it. + # + # Issue: https://github.com/NixOS/nixpkgs/issues/348658 + # Fixed in https://github.com/autotools-mirror/gettext/commit/cb2c1486336462c8180f487221181ee798b0e73e + # Remove in 0.22.5 upgrade. + ++ lib.optional (stdenv.cc.isClang && !stdenv.targetPlatform.isDarwin) ./fix-getcwd-clang.patch; outputs = [ "out" "man" "doc" "info" ]; hardeningDisable = [ "format" ]; - LDFLAGS = lib.optionalString stdenv.isSunOS "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec"; + LDFLAGS = lib.optionalString stdenv.hostPlatform.isSunOS "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec"; configureFlags = [ "--disable-csharp" @@ -56,7 +65,7 @@ stdenv.mkDerivation rec { buildInputs = lib.optionals (!stdenv.hostPlatform.isMinGW) [ bash ] - ++ lib.optionals (!stdenv.isLinux && !stdenv.hostPlatform.isCygwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isCygwin) [ # HACK, see #10874 (and 14664) libiconv ]; @@ -102,6 +111,6 @@ stdenv.mkDerivation rec { }; } -// lib.optionalAttrs stdenv.isDarwin { +// lib.optionalAttrs stdenv.hostPlatform.isDarwin { makeFlags = [ "CFLAGS=-D_FORTIFY_SOURCE=0" ]; } |