From d9e4fc31ea7728b39c1ff2f2963e4f3df716b6b7 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Thu, 30 Jan 2020 01:41:12 -0500 Subject: [PATCH 1/2] gettext: Add macOS warning patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gettext 0.20 fixed a bug with handling locale on macOS, but this caused it to report an annoying warning on systems where “language” differs from “region”. See Homebrew issue for details: . Add upstream patch that has not been released yet. Details: . --- pkgs/development/libraries/gettext/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index c2165a9d9c7..50f56ec442d 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, libiconv, xz }: +{ stdenv, lib, fetchurl, libiconv, xz, fetchpatch }: stdenv.mkDerivation rec { pname = "gettext"; @@ -11,7 +11,15 @@ stdenv.mkDerivation rec { patches = [ ./absolute-paths.diff ./gettext.git-2336451ed68d91ff4b5ae1acbc1eca30e47a86a9.patch - ]; + ] + # HACK: Since this is merely a UX fix, to minimise rebuilds only patch + # the final library. + # Remove the entire thing when updating to the next release. + ++ lib.optional (stdenv.isDarwin && !(lib.hasPrefix "bootstrap" stdenv.name)) + (fetchpatch { + url = "https://git.savannah.gnu.org/cgit/gettext.git/patch?id=ec0e6b307456ceab352669ae6bccca9702108753"; + sha256 = "0xqs01c7xl7vmw6bqvsmrzxxjxk2a4spcdpmlwm3b4hi2wc2lxnf"; + }); outputs = [ "out" "man" "doc" "info" ]; From c0d1f26d42b4cb3f19d30ef48937b00117446e7f Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Fri, 31 Jan 2020 15:49:26 -0500 Subject: [PATCH 2/2] gettext: Remove the rebuild optimisation hack --- pkgs/development/libraries/gettext/default.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 50f56ec442d..c28afa17418 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -12,10 +12,7 @@ stdenv.mkDerivation rec { ./absolute-paths.diff ./gettext.git-2336451ed68d91ff4b5ae1acbc1eca30e47a86a9.patch ] - # HACK: Since this is merely a UX fix, to minimise rebuilds only patch - # the final library. - # Remove the entire thing when updating to the next release. - ++ lib.optional (stdenv.isDarwin && !(lib.hasPrefix "bootstrap" stdenv.name)) + ++ lib.optional stdenv.isDarwin (fetchpatch { url = "https://git.savannah.gnu.org/cgit/gettext.git/patch?id=ec0e6b307456ceab352669ae6bccca9702108753"; sha256 = "0xqs01c7xl7vmw6bqvsmrzxxjxk2a4spcdpmlwm3b4hi2wc2lxnf";