summary refs log tree commit diff
path: root/pkgs/development/libraries/poppler/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/poppler/default.nix')
-rw-r--r--pkgs/development/libraries/poppler/default.nix33
1 files changed, 19 insertions, 14 deletions
diff --git a/pkgs/development/libraries/poppler/default.nix b/pkgs/development/libraries/poppler/default.nix
index c79cdfd4466..b15142dc673 100644
--- a/pkgs/development/libraries/poppler/default.nix
+++ b/pkgs/development/libraries/poppler/default.nix
@@ -1,12 +1,12 @@
-{ stdenv, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
+{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, libiconv, libintlOrEmpty
 , zlib, curl, cairo, freetype, fontconfig, lcms, libjpeg, openjpeg
-, qt4Support ? false, qt4 ? null, qt5Support ? false, qt5 ? null
+, minimal ? false, qt4Support ? false, qt4 ? null, qt5Support ? false, qtbase ? null
 , utils ? false, suffix ? "glib"
 }:
 
-let
-  version = "0.32.0"; # even major numbers are stable
-  sha256 = "162vfbvbz0frvqyk00ldsbl49h4bj8i8wn0ngfl30xg1lldy6qs9";
+let # beware: updates often break cups_filters build
+  version = "0.34.0"; # even major numbers are stable
+  sha256 = "1c2wa4pfzqmvzq1jpp3ps5nmzz745gcg8dnpwqpfdccy5ydbm90v";
 in
 stdenv.mkDerivation rec {
   name = "poppler-${suffix}-${version}";
@@ -16,26 +16,31 @@ stdenv.mkDerivation rec {
     inherit sha256;
   };
 
+  outputs = [ "out" ] ++ lib.optional (!minimal) "doc";
+
   patches = [ ./datadir_env.patch ];
 
-  propagatedBuildInputs = with stdenv.lib;
-    [ zlib cairo freetype fontconfig libjpeg lcms curl openjpeg ]
+  # TODO: reduce propagation to necessary libs
+  propagatedBuildInputs = with lib;
+    [ zlib freetype fontconfig libjpeg lcms curl openjpeg ]
+    ++ optional (!minimal) cairo
     ++ optional qt4Support qt4
-    ++ optional qt5Support qt5.base;
+    ++ optional qt5Support qtbase;
 
   nativeBuildInputs = [ pkgconfig libiconv ] ++ libintlOrEmpty;
 
-  configureFlags =
+  configureFlags = with lib;
     [
       "--enable-xpdf-headers"
       "--enable-libcurl"
       "--enable-zlib"
     ]
-    ++ stdenv.lib.optional (!utils) "--disable-utils";
+    ++ optionals minimal [ "--disable-poppler-glib" "--disable-poppler-cpp" ]
+    ++ optional (!utils) "--disable-utils";
 
   enableParallelBuilding = true;
 
-  meta = {
+  meta = with lib; {
     homepage = http://poppler.freedesktop.org/;
     description = "A PDF rendering library";
 
@@ -43,8 +48,8 @@ stdenv.mkDerivation rec {
       Poppler is a PDF rendering library based on the xpdf-3.0 code base.
     '';
 
-    license = stdenv.lib.licenses.gpl2;
-    platforms = stdenv.lib.platforms.all;
-    maintainers = with stdenv.lib.maintainers; [ ttuegel ];
+    license = licenses.gpl2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ ttuegel ];
   };
 }