From e33b77d84d1c4dabc18a439e39c9f084e7c566fb Mon Sep 17 00:00:00 2001 From: Danny Wilson Date: Thu, 28 Feb 2013 16:49:46 +0100 Subject: [PATCH] Fix gnugrep build on Illumos. --- pkgs/tools/text/gnugrep/default.nix | 2 ++ pkgs/tools/text/gnugrep/test-localeconv.patch | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 pkgs/tools/text/gnugrep/test-localeconv.patch diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index 98a737339d2..fde9123adf2 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation { buildInputs = [ pcre ] ++ stdenv.lib.optional (libiconv != null) libiconv; + patches = [ ./test-localeconv.patch ]; + NIX_LDFLAGS = stdenv.lib.optionalString (libiconv != null) "-L${libiconv}/lib -liconv"; doCheck = !stdenv.isDarwin; diff --git a/pkgs/tools/text/gnugrep/test-localeconv.patch b/pkgs/tools/text/gnugrep/test-localeconv.patch new file mode 100644 index 00000000000..f5efaf22221 --- /dev/null +++ b/pkgs/tools/text/gnugrep/test-localeconv.patch @@ -0,0 +1,18 @@ +--- grep-2.14/gnulib-tests/test-localeconv.c.orig 2013-02-15 18:41:50.213433059 +0000 ++++ grep-2.14/gnulib-tests/test-localeconv.c 2013-02-15 18:50:33.964751303 +0000 +@@ -37,13 +37,13 @@ + + ASSERT (STREQ (l->decimal_point, ".")); + ASSERT (STREQ (l->thousands_sep, "")); +-#if !defined __FreeBSD__ ++#if !(defined __FreeBSD__ || defined __sun) + ASSERT (STREQ (l->grouping, "")); + #endif + + ASSERT (STREQ (l->mon_decimal_point, "")); + ASSERT (STREQ (l->mon_thousands_sep, "")); +-#if !defined __FreeBSD__ ++#if !(defined __FreeBSD__ || defined __sun) + ASSERT (STREQ (l->mon_grouping, "")); + #endif + ASSERT (STREQ (l->positive_sign, ""));