diff options
Diffstat (limited to 'pkgs/applications/misc/xpdf/default.nix')
-rw-r--r-- | pkgs/applications/misc/xpdf/default.nix | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix index 5218df775955..fdcdd4770d0e 100644 --- a/pkgs/applications/misc/xpdf/default.nix +++ b/pkgs/applications/misc/xpdf/default.nix @@ -18,26 +18,20 @@ stdenv.mkDerivation { }; buildInputs = - (if enableGUI then [x11 motif] else []) ++ - (if useT1Lib then [t1lib] else []); + stdenv.lib.optionals enableGUI [x11 motif] ++ + stdenv.lib.optional useT1Lib t1lib ++ + stdenv.lib.optional enablePDFtoPPM freetype; # Debian uses '-fpermissive' to bypass some errors on char* constantness. CXXFLAGS = "-O2 -fpermissive"; - configureFlags = - "--infodir=$out/share/info --mandir=$out/share/man --enable-a4-paper" - + (if enablePDFtoPPM then - " --with-freetype2-library=${freetype}/lib" - + " --with-freetype2-includes=${freetype}/include/freetype2" - else ""); - - postInstall = " - if test -n \"${base14Fonts}\"; then - substituteInPlace $out/etc/xpdfrc \\ - --replace /usr/local/share/ghostscript/fonts ${base14Fonts} \\ - --replace '#fontFile' fontFile - fi - "; + configureFlags = "--enable-a4-paper"; + + postInstall = stdenv.lib.optionalString (base14Fonts != null) '' + substituteInPlace $out/etc/xpdfrc \ + --replace /usr/local/share/ghostscript/fonts ${base14Fonts} \ + --replace '#fontFile' fontFile + ''; meta = { homepage = "http://www.foolabs.com/xpdf/"; |