diff options
Diffstat (limited to 'pkgs/applications/misc/xpdf/default.nix')
-rw-r--r-- | pkgs/applications/misc/xpdf/default.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix index ef031c4b9f4d..42622b62f61b 100644 --- a/pkgs/applications/misc/xpdf/default.nix +++ b/pkgs/applications/misc/xpdf/default.nix @@ -1,6 +1,6 @@ { enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false , stdenv, fetchurl, zlib, libpng, freetype ? null, t1lib ? null -, cmake, qtbase ? null +, cmake, qtbase ? null, makeWrapper }: assert enableGUI -> qtbase != null && freetype != null; @@ -17,7 +17,12 @@ stdenv.mkDerivation { sha256 = "1mhn89738vjva14xr5gblc2zrdgzmpqbbjdflqdmpqv647294ggz"; }; - nativeBuildInputs = [ cmake ]; + # Fix "No known features for CXX compiler", see + # https://cmake.org/pipermail/cmake/2016-December/064733.html and the note at + # https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html + patches = stdenv.lib.optional stdenv.isDarwin ./cmake_version.patch; + + nativeBuildInputs = [ cmake makeWrapper ]; cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"]; @@ -31,6 +36,11 @@ stdenv.mkDerivation { hardeningDisable = [ "format" ]; + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' + wrapProgram $out/bin/xpdf \ + --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms + ''; + meta = { homepage = http://www.foolabs.com/xpdf/; description = "Viewer for Portable Document Format (PDF) files"; |