about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-10-27 17:13:21 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-01-09 11:23:56 -0500
commit6db707fe7e0b65afb9c306b798e1aeae743f1b51 (patch)
tree9b75f927a7def8c28b90a637736f7ba060fb8a49
parentbef09dcca11163f030608eaa2577ce9f52a8324b (diff)
downloadnixlib-6db707fe7e0b65afb9c306b798e1aeae743f1b51.tar
nixlib-6db707fe7e0b65afb9c306b798e1aeae743f1b51.tar.gz
nixlib-6db707fe7e0b65afb9c306b798e1aeae743f1b51.tar.bz2
nixlib-6db707fe7e0b65afb9c306b798e1aeae743f1b51.tar.lz
nixlib-6db707fe7e0b65afb9c306b798e1aeae743f1b51.tar.xz
nixlib-6db707fe7e0b65afb9c306b798e1aeae743f1b51.tar.zst
nixlib-6db707fe7e0b65afb9c306b798e1aeae743f1b51.zip
pkgconfig: Enable cross-compilation
(cherry picked from commit 91fdb2f9caf5ce14acb87f3b877216aeb2590e7e)
-rw-r--r--pkgs/development/tools/misc/pkgconfig/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/pkgconfig/default.nix b/pkgs/development/tools/misc/pkgconfig/default.nix
index 5be42855a9c7..7cfd78a39a28 100644
--- a/pkgs/development/tools/misc/pkgconfig/default.nix
+++ b/pkgs/development/tools/misc/pkgconfig/default.nix
@@ -24,7 +24,15 @@ stdenv.mkDerivation rec {
   buildInputs = optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
 
   configureFlags = [ "--with-internal-glib" ]
-    ++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ];
+    ++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ]
+       # Can't run these tests while cross-compiling
+    ++ optional (stdenv.hostPlatform != stdenv.buildPlatform)
+       [ "glib_cv_stack_grows=no"
+         "glib_cv_uscore=no"
+         "ac_cv_func_posix_getpwuid_r=yes"
+         "ac_cv_func_posix_getgrgid_r=yes"
+       ];
+
 
   postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file