mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
* ImageMagick: don't need to keep old versions I guess.
* texFunctions.simpleTexToPNG: purity (use our own ImageMagick). svn path=/nixpkgs/trunk/; revision=11836
This commit is contained in:
parent
4bbd9bab29
commit
3042994875
@ -1,26 +0,0 @@
|
||||
args: with args;
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "ImageMagick-6.3.8-5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.imagemagick.org/pub/ImageMagick/${name}.tar.bz2";
|
||||
sha256 = "0lsvi2z5b5zam6yvjzsyjpa36rg1c0kczifz73k9b4v8zz9a9vfl";
|
||||
};
|
||||
|
||||
configureFlags = " --with-dots --with-gs-font-dir="+ ghostscript +
|
||||
"/share/ghostscript/fonts --with-gslib " +(
|
||||
if args ? tetex then " --with-frozenpaths " else ""
|
||||
);
|
||||
|
||||
buildInputs = [bzip2 freetype ghostscript graphviz libjpeg libpng
|
||||
libtiff libX11 libxml2 zlib libtool] ++ (if args ? tetex then [args.tetex] else [])
|
||||
++ (if args ? librsvg then [args.librsvg] else []);
|
||||
|
||||
meta = {
|
||||
homepage = http://www.imagemagick.org;
|
||||
};
|
||||
} // (if args ? tetex then {
|
||||
preConfigure = "
|
||||
export DVIDecodeDelegate=${args.tetex}/bin/dvips
|
||||
";
|
||||
} else {}))
|
@ -1,26 +0,0 @@
|
||||
args: with args;
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "ImageMagick-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.imagemagick.org/pub/ImageMagick/${name}.tar.bz2";
|
||||
sha256 = "0a8defbfa867bb5e969f898d9a3b65a8c4f6952cb71411b40f005dd0a183644e";
|
||||
};
|
||||
|
||||
configureFlags = " --with-dots --with-gs-font-dir="+ ghostscript +
|
||||
"/share/ghostscript/fonts --with-gslib " +(
|
||||
if args ? tetex then " --with-frozenpaths " else ""
|
||||
);
|
||||
|
||||
buildInputs = [bzip2 freetype ghostscript graphviz libjpeg libpng
|
||||
libtiff libX11 libxml2 zlib libtool] ++ (if args ? tetex then [args.tetex] else [])
|
||||
++ (if args ? librsvg then [args.librsvg] else []);
|
||||
|
||||
meta = {
|
||||
homepage = http://www.imagemagick.org;
|
||||
};
|
||||
} // (if args ? tetex then {
|
||||
preConfigure = "
|
||||
export DVIDecodeDelegate=${args.tetex}/bin/dvips
|
||||
";
|
||||
} else {}))
|
@ -1,5 +1,7 @@
|
||||
args: with args;
|
||||
|
||||
let version = "6.4.1-1"; in
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "ImageMagick-${version}";
|
||||
|
||||
@ -8,7 +10,7 @@ stdenv.mkDerivation (rec {
|
||||
"ftp://ftp.imagemagick.org/pub/ImageMagick/${name}.tar.bz2"
|
||||
"http://ftp.surfnet.nl/pub/ImageMagick/${name}.tar.bz2"
|
||||
];
|
||||
sha256 = "0ynn8gxixjb16xhg60hp2sbfymh03y5qxxgffwlchciiylw9dlvd";
|
||||
sha256 = "0a8defbfa867bb5e969f898d9a3b65a8c4f6952cb71411b40f005dd0a183644e";
|
||||
};
|
||||
|
||||
configureFlags = ''
|
@ -95,15 +95,15 @@ rec {
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
inherit name preamble body;
|
||||
buildCommand = "
|
||||
buildCommand = ''
|
||||
touch $out
|
||||
echo '\\documentclass{article}' >> $out
|
||||
echo '\\pagestyle{empty}' >> $out
|
||||
if test -n \"$preamble\"; then cat $preamble >> $out; fi
|
||||
echo '\\begin{document}' >> $out
|
||||
echo '\documentclass{article}' >> $out
|
||||
echo '\pagestyle{empty}' >> $out
|
||||
if test -n "$preamble"; then cat $preamble >> $out; fi
|
||||
echo '\begin{document}' >> $out
|
||||
cat $body >> $out
|
||||
echo '\\end{document}' >> $out
|
||||
";
|
||||
echo '\end{document}' >> $out
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@ -116,8 +116,10 @@ rec {
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "png";
|
||||
inherit postscript;
|
||||
|
||||
buildInputs = [pkgs.imagemagick pkgs.ghostscript];
|
||||
|
||||
buildCommand = "
|
||||
buildCommand = ''
|
||||
if test -d $postscript; then
|
||||
input=$(ls $postscript/*.ps)
|
||||
else
|
||||
@ -125,19 +127,17 @@ rec {
|
||||
ln -s $postscript $input
|
||||
fi
|
||||
|
||||
# !!! Quick hack: no ImageMagick in Nixpkgs yet!
|
||||
export PATH=/usr/bin:$PATH
|
||||
ensureDir $out
|
||||
convert -units PixelsPerInch \\
|
||||
-density 300 \\
|
||||
-trim \\
|
||||
-matte \\
|
||||
-transparent '#ffffff' \\
|
||||
-type PaletteMatte \\
|
||||
+repage \\
|
||||
$input \\
|
||||
\"$out/$(basename $input .ps).png\"
|
||||
";
|
||||
convert -units PixelsPerInch \
|
||||
-density 300 \
|
||||
-trim \
|
||||
-matte \
|
||||
-transparent '#ffffff' \
|
||||
-type PaletteMatte \
|
||||
+repage \
|
||||
$input \
|
||||
"$out/$(basename $input .ps).png"
|
||||
''; # */
|
||||
};
|
||||
|
||||
|
||||
@ -162,5 +162,21 @@ rec {
|
||||
};
|
||||
|
||||
|
||||
|
||||
# Convert a piece of TeX code to a PDF.
|
||||
simpleTeXToPDF =
|
||||
{ preamble ? null
|
||||
, body
|
||||
, name ? baseNameOf (toString body)
|
||||
, packages ? []
|
||||
}:
|
||||
|
||||
runLaTeX {
|
||||
rootFile = wrapSimpleTeX {
|
||||
inherit body preamble;
|
||||
};
|
||||
inherit packages;
|
||||
searchRelativeTo = dirOf (toString body);
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
@ -5374,21 +5374,17 @@ let pkgs = rec {
|
||||
inherit (xlibs) libX11 libXft libXext libXinerama libXrandr;
|
||||
};
|
||||
|
||||
imagemagickFun = lib.sumArgs (selectVersion ../applications/graphics/ImageMagick "6.4.1-1" ) {
|
||||
inherit stdenv fetchurl libtool;
|
||||
imagemagick = import ../applications/graphics/ImageMagick {
|
||||
inherit stdenv fetchurl bzip2 freetype graphviz ghostscript
|
||||
libjpeg libpng libtiff libxml2 zlib libtool;
|
||||
inherit (xlibs) libX11;
|
||||
};
|
||||
|
||||
imagemagick = imagemagickFun {
|
||||
inherit bzip2 freetype graphviz ghostscript libjpeg libpng libtiff
|
||||
libxml2 zlib;
|
||||
imagemagickBig = import ../applications/graphics/ImageMagick {
|
||||
inherit stdenv fetchurl bzip2 freetype graphviz ghostscript
|
||||
libjpeg libpng libtiff libxml2 zlib tetex librsvg libtool;
|
||||
inherit (xlibs) libX11;
|
||||
} null;
|
||||
|
||||
imagemagickBig = imagemagickFun {
|
||||
inherit bzip2 freetype graphviz ghostscript libjpeg libpng libtiff
|
||||
libxml2 zlib tetex librsvg;
|
||||
inherit (xlibs) libX11;
|
||||
} null;
|
||||
};
|
||||
|
||||
inkscape = import ../applications/graphics/inkscape {
|
||||
inherit fetchurl stdenv perl perlXMLParser pkgconfig zlib
|
||||
@ -6508,7 +6504,7 @@ let pkgs = rec {
|
||||
*/
|
||||
|
||||
texFunctions = import ../misc/tex/nix {
|
||||
inherit stdenv perl tetex graphviz ghostscript;
|
||||
inherit stdenv perl tetex graphviz ghostscript imagemagick;
|
||||
};
|
||||
|
||||
texLiveFun = builderDefsPackage (import ../misc/tex/texlive) {
|
||||
|
Loading…
Reference in New Issue
Block a user