summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/libiconv/default.nix2
-rw-r--r--pkgs/development/libraries/libiconv/setup-hook.sh7
2 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libiconv/default.nix b/pkgs/development/libraries/libiconv/default.nix
index b55fc18cb69..a4e6fed88e1 100644
--- a/pkgs/development/libraries/libiconv/default.nix
+++ b/pkgs/development/libraries/libiconv/default.nix
@@ -14,6 +14,8 @@ stdenv.mkDerivation rec {
     sha256 = "0y1ij745r4p48mxq84rax40p10ln7fc7m243p8k8sia519i3dxfc";
   };
 
+  setupHook = ./setup-hook.sh;
+
   postPatch =
     lib.optionalString ((hostPlatform != buildPlatform && hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc)
       ''
diff --git a/pkgs/development/libraries/libiconv/setup-hook.sh b/pkgs/development/libraries/libiconv/setup-hook.sh
new file mode 100644
index 00000000000..d8e1b4597a0
--- /dev/null
+++ b/pkgs/development/libraries/libiconv/setup-hook.sh
@@ -0,0 +1,7 @@
+# libintl must be listed in load flags on non-Glibc
+# it doesn't hurt to have it in Glibc either though
+iconvLdflags() {
+    export NIX_LDFLAGS="$NIX_LDFLAGS -iconv"
+}
+
+addEnvHooks "$hostOffset" iconvLdflags