summary refs log tree commit diff
path: root/pkgs/applications/graphics/ImageMagick
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-06-26 18:38:34 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-06-28 18:20:38 -0400
commita11426c52376d0d6b82d24519a333a3c1f7dec71 (patch)
tree67384c257e52c22b72213ffbe064419f0950bb05 /pkgs/applications/graphics/ImageMagick
parent099b83f90d8996fcae2a03e5c85f13a8a3341d72 (diff)
downloadnixpkgs-a11426c52376d0d6b82d24519a333a3c1f7dec71.tar
nixpkgs-a11426c52376d0d6b82d24519a333a3c1f7dec71.tar.gz
nixpkgs-a11426c52376d0d6b82d24519a333a3c1f7dec71.tar.bz2
nixpkgs-a11426c52376d0d6b82d24519a333a3c1f7dec71.tar.lz
nixpkgs-a11426c52376d0d6b82d24519a333a3c1f7dec71.tar.xz
nixpkgs-a11426c52376d0d6b82d24519a333a3c1f7dec71.tar.zst
nixpkgs-a11426c52376d0d6b82d24519a333a3c1f7dec71.zip
ImageMagick: Don't use stdenv.cross
I'm guessing the salient aspect here is not cross compiling itself, but
just whether the host platform is MinGW, so I simplified the logic
accordingly
Diffstat (limited to 'pkgs/applications/graphics/ImageMagick')
-rw-r--r--pkgs/applications/graphics/ImageMagick/7.0.nix7
-rw-r--r--pkgs/applications/graphics/ImageMagick/default.nix9
2 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/applications/graphics/ImageMagick/7.0.nix b/pkgs/applications/graphics/ImageMagick/7.0.nix
index bcad077b38c..5eaf488fff5 100644
--- a/pkgs/applications/graphics/ImageMagick/7.0.nix
+++ b/pkgs/applications/graphics/ImageMagick/7.0.nix
@@ -2,6 +2,7 @@
 , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg
 , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp
 , ApplicationServices
+, buildPlatform, hostPlatform
 }:
 
 let
@@ -47,7 +48,7 @@ stdenv.mkDerivation rec {
       [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
         "--with-gslib"
       ]
-    ++ lib.optionals (stdenv.cross.libc or null == "msvcrt")
+    ++ lib.optionals hostPlatform.isMinGW
       [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM
     ;
 
@@ -57,13 +58,13 @@ stdenv.mkDerivation rec {
     [ zlib fontconfig freetype ghostscript
       libpng libtiff libxml2
     ]
-    ++ lib.optionals (stdenv.cross.libc or null != "msvcrt")
+    ++ lib.optionals (!hostPlatform.isMinGW)
       [ openexr librsvg openjpeg ]
     ++ lib.optional stdenv.isDarwin ApplicationServices;
 
   propagatedBuildInputs =
     [ bzip2 freetype libjpeg lcms2 ]
-    ++ lib.optionals (stdenv.cross.libc or null != "msvcrt")
+    ++ lib.optionals (!hostPlatform.isMinGW)
       [ libX11 libXext libXt libwebp ]
     ;
 
diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix
index 8f4d44932f5..39812b2cfc4 100644
--- a/pkgs/applications/graphics/ImageMagick/default.nix
+++ b/pkgs/applications/graphics/ImageMagick/default.nix
@@ -2,6 +2,7 @@
 , bzip2, zlib, libX11, libXext, libXt, fontconfig, freetype, ghostscript, libjpeg
 , lcms2, openexr, libpng, librsvg, libtiff, libxml2, openjpeg, libwebp
 , ApplicationServices
+, buildPlatform, hostPlatform
 }:
 
 let
@@ -18,7 +19,7 @@ let
   }
     # Freeze version on mingw so we don't need to port the patch too often.
     # FIXME: This version has multiple security vulnerabilities
-    // lib.optionalAttrs (stdenv.cross.libc or null == "msvcrt") {
+    // lib.optionalAttrs (hostPlatform.isMinGW) {
         version = "6.9.2-0";
         sha256 = "17ir8bw1j7g7srqmsz3rx780sgnc21zfn0kwyj78iazrywldx8h7";
         patches = [(fetchpatch {
@@ -59,7 +60,7 @@ stdenv.mkDerivation rec {
       [ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
         "--with-gslib"
       ]
-    ++ lib.optionals (stdenv.cross.libc or null == "msvcrt")
+    ++ lib.optionals (hostPlatform.isMinGW)
       [ "--enable-static" "--disable-shared" ] # due to libxml2 being without DLLs ATM
     ;
 
@@ -69,13 +70,13 @@ stdenv.mkDerivation rec {
     [ zlib fontconfig freetype ghostscript
       libpng libtiff libxml2
     ]
-    ++ lib.optionals (stdenv.cross.libc or null != "msvcrt")
+    ++ lib.optionals (!hostPlatform.isMinGW)
       [ openexr librsvg openjpeg ]
     ++ lib.optional stdenv.isDarwin ApplicationServices;
 
   propagatedBuildInputs =
     [ bzip2 freetype libjpeg lcms2 ]
-    ++ lib.optionals (stdenv.cross.libc or null != "msvcrt")
+    ++ lib.optionals (!hostPlatform.isMinGW)
       [ libX11 libXext libXt libwebp ]
     ;