about summary refs log tree commit diff
path: root/pkgs/development/libraries/freetype/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-05-05 08:30:19 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-05-05 08:30:19 +0200
commit1dc36904d8cefa8188c785efd03274637c838e31 (patch)
tree0cf37f0803f1e9c6985d09f2870e5ec61229d2ca /pkgs/development/libraries/freetype/default.nix
parent75f1cc61b86b002f551529f1cafa30b4f4010bd9 (diff)
parent7a005601d48f760864258e369364b3b847d4e9fd (diff)
downloadnixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar
nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.gz
nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.bz2
nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.lz
nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.xz
nixlib-1dc36904d8cefa8188c785efd03274637c838e31.tar.zst
nixlib-1dc36904d8cefa8188c785efd03274637c838e31.zip
Merge #14920: windows improvements, mainly mingw
Diffstat (limited to 'pkgs/development/libraries/freetype/default.nix')
-rw-r--r--pkgs/development/libraries/freetype/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix
index 81e98056e90b..0548d1433b75 100644
--- a/pkgs/development/libraries/freetype/default.nix
+++ b/pkgs/development/libraries/freetype/default.nix
@@ -26,7 +26,8 @@ stdenv.mkDerivation rec {
   };
 
   patches = []
-    ++ optionals useEncumberedCode [
+    # mingw: these patches use `strcasestr` which isn't available on windows
+    ++ optionals (useEncumberedCode && stdenv.cross.libc or null != "msvcrt" ) [
       (fetchbohoomil "01-freetype-2.6.2-enable-valid.patch"
         "1szq0zha7n41f4pq179wgfkam034mp2xn0xc36sdl5sjp9s9hv08")
       (fetchbohoomil "02-upstream-2015.12.05.patch"
@@ -39,7 +40,7 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype
   # dependence on harfbuzz is looser than the reverse dependence
-  buildInputs = [ pkgconfig which ]
+  nativeBuildInputs = [ pkgconfig which ]
     # FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
     ++ optional (!stdenv.isLinux) gnumake;
 
@@ -56,7 +57,7 @@ stdenv.mkDerivation rec {
 
   postInstall = glib.flattenInclude;
 
-  crossAttrs = {
+  crossAttrs = stdenv.lib.optionalAttrs (stdenv.cross.libc or null != "msvcrt") {
     # Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead
     # of gcc. I think it's due to the unwrapped gcc being in the PATH. I don't
     # know why it's on the PATH.