diff options
author | Orivej Desh <orivej@gmx.fr> | 2017-12-04 04:30:45 +0000 |
---|---|---|
committer | Orivej Desh <orivej@gmx.fr> | 2017-12-04 15:26:52 +0000 |
commit | a5c832f1afc3a108ca04f81e1fd8f137992420a7 (patch) | |
tree | 21a92e2c464c0184e07757330d4eb3d1b6176b69 /pkgs/development/libraries/gettext | |
parent | 59bcd866404e083d854a2de7fe1edb914ccddebf (diff) |
gettext: add setup hook populating GETTEXTDATADIRS
Fixes #32296 (cherry picked from commit f727aeb4505a9646eb7f7d67ed0fd411900b570c)
Diffstat (limited to 'pkgs/development/libraries/gettext')
-rw-r--r-- | pkgs/development/libraries/gettext/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/gettext/gettext-setup-hook.sh | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index a35d2380ededb..9c3024ce25fb6 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -48,6 +48,8 @@ stdenv.mkDerivation rec { # HACK, see #10874 (and 14664) buildInputs = stdenv.lib.optional (!stdenv.isLinux && !hostPlatform.isCygwin) libiconv; + setupHook = ./gettext-setup-hook.sh; + enableParallelBuilding = true; meta = { diff --git a/pkgs/development/libraries/gettext/gettext-setup-hook.sh b/pkgs/development/libraries/gettext/gettext-setup-hook.sh new file mode 100644 index 0000000000000..fe3ef1f9e15d9 --- /dev/null +++ b/pkgs/development/libraries/gettext/gettext-setup-hook.sh @@ -0,0 +1,7 @@ +gettextDataDirsHook() { + if [ -d "$1/share/gettext" ]; then + addToSearchPath GETTEXTDATADIRS "$1/share/gettext" + fi +} + +envHooks+=(gettextDataDirsHook) |