diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index 57c236297d8b..e40c0372ffec 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -1,8 +1,25 @@ -args: with args; +{ stdenv +, fetchurl +, bzip2 +, freetype +, graphviz +, ghostscript +, libjpeg +, libpng +, libtiff +, libxml2 +, zlib +, libtool +, jasper +, libX11 +, tetex ? null +, librsvg ? null +}: -let version = "6.5.9-1"; in - -stdenv.mkDerivation (rec { +let + version = "6.5.9-1"; +in +stdenv.mkDerivation rec { name = "ImageMagick-${version}"; src = fetchurl { @@ -13,22 +30,20 @@ stdenv.mkDerivation (rec { configureFlags = '' --with-gs-font-dir=${ghostscript}/share/ghostscript/fonts --with-gslib - ${if args ? tetex then "--with-frozenpaths" else ""} + ${if tetex != null then "--with-frozenpaths" else ""} ''; buildInputs = - [ bzip2 freetype ghostscript graphviz libjpeg libpng - libtiff libX11 libxml2 zlib libtool - ] - ++ stdenv.lib.optional (args ? tetex) args.tetex - ++ stdenv.lib.optional (args ? librsvg) args.librsvg; + [ bzip2 freetype graphviz ghostscript libjpeg libpng + libtiff libxml2 zlib tetex librsvg libtool jasper libX11 + ]; - preConfigure = if args ? tetex then + preConfigure = if tetex != null then '' - export DVIDecodeDelegate=${args.tetex}/bin/dvips + export DVIDecodeDelegate=${tetex}/bin/dvips '' else ""; meta = { homepage = http://www.imagemagick.org; }; -}) +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ddaba4593337..bf7c8983f907 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7678,13 +7678,14 @@ let imagemagick = import ../applications/graphics/ImageMagick { inherit stdenv fetchurl bzip2 freetype graphviz ghostscript - libjpeg libpng libtiff libxml2 zlib libtool; + libjpeg libpng libtiff libxml2 zlib libtool jasper; inherit (xlibs) libX11; }; imagemagickBig = import ../applications/graphics/ImageMagick { inherit stdenv fetchurl bzip2 freetype graphviz ghostscript - libjpeg libpng libtiff libxml2 zlib tetex librsvg libtool; + libjpeg libpng libtiff libxml2 zlib tetex librsvg libtool + jasper; inherit (xlibs) libX11; };