poppler: add _min variant that doesn't bring X stuff
This commit is contained in:
parent
fa33b083eb
commit
fe5c8d78a0
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
|
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
|
||||||
, zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
|
, zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
|
||||||
, qt4Support ? false, qt4 ? null, qt5Support ? false, qt5 ? null
|
, minimal ? false, qt4Support ? false, qt4 ? null, qt5Support ? false, qt5 ? null
|
||||||
, utils ? false, suffix ? "glib"
|
, utils ? false, suffix ? "glib"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -16,28 +16,31 @@ stdenv.mkDerivation rec {
|
|||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "doc" ];
|
outputs = [ "out" ] ++ lib.optional (!minimal) "doc";
|
||||||
|
|
||||||
patches = [ ./datadir_env.patch ];
|
patches = [ ./datadir_env.patch ];
|
||||||
|
|
||||||
propagatedBuildInputs = with stdenv.lib;
|
# TODO: reduce propagation to necessary libs
|
||||||
[ zlib cairo freetype fontconfig libjpeg lcms curl openjpeg ]
|
propagatedBuildInputs = with lib;
|
||||||
|
[ zlib freetype fontconfig libjpeg lcms curl openjpeg ]
|
||||||
|
++ optional (!minimal) cairo
|
||||||
++ optional qt4Support qt4
|
++ optional qt4Support qt4
|
||||||
++ optional qt5Support qt5.base;
|
++ optional qt5Support qt5.base;
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty;
|
nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty;
|
||||||
|
|
||||||
configureFlags =
|
configureFlags = with lib;
|
||||||
[
|
[
|
||||||
"--enable-xpdf-headers"
|
"--enable-xpdf-headers"
|
||||||
"--enable-libcurl"
|
"--enable-libcurl"
|
||||||
"--enable-zlib"
|
"--enable-zlib"
|
||||||
]
|
]
|
||||||
++ stdenv.lib.optional (!utils) "--disable-utils";
|
++ optionals minimal [ "--disable-poppler-glib" "--disable-poppler-cpp" ]
|
||||||
|
++ optional (!utils) "--disable-utils";
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
homepage = http://poppler.freedesktop.org/;
|
homepage = http://poppler.freedesktop.org/;
|
||||||
description = "A PDF rendering library";
|
description = "A PDF rendering library";
|
||||||
|
|
||||||
@ -45,8 +48,8 @@ stdenv.mkDerivation rec {
|
|||||||
Poppler is a PDF rendering library based on the xpdf-3.0 code base.
|
Poppler is a PDF rendering library based on the xpdf-3.0 code base.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
license = stdenv.lib.licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = with stdenv.lib.maintainers; [ ttuegel ];
|
maintainers = with maintainers; [ ttuegel ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -7780,6 +7780,11 @@ let
|
|||||||
|
|
||||||
poppler = callPackage ../development/libraries/poppler { lcms = lcms2; };
|
poppler = callPackage ../development/libraries/poppler { lcms = lcms2; };
|
||||||
|
|
||||||
|
poppler_min = poppler.override { # TODO: maybe reduce even more
|
||||||
|
minimal = true;
|
||||||
|
suffix = "min";
|
||||||
|
};
|
||||||
|
|
||||||
poppler_qt4 = poppler.override {
|
poppler_qt4 = poppler.override {
|
||||||
qt4Support = true;
|
qt4Support = true;
|
||||||
suffix = "qt4";
|
suffix = "qt4";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user