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
This commit is contained in:
parent
099b83f90d
commit
a11426c523
@ -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 ]
|
||||
;
|
||||
|
||||
|
@ -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 ]
|
||||
;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user