diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2018-03-01 10:50:56 -0500 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2018-03-01 10:51:00 -0500 |
commit | ea66292a1615a1455ccdf0b8a3641bc5f02ca14b (patch) | |
tree | e58c04cd3781030974c7edc9359082d927ee2793 /pkgs/applications/misc/xpdf | |
parent | f5892d07182c1011816eedde2ec2d7a9bd0f2151 (diff) |
xpdf: fix a runtime error
'This application failed to start because it could not find or load the Qt platform plugin "cocoa" in "".'
Diffstat (limited to 'pkgs/applications/misc/xpdf')
-rw-r--r-- | pkgs/applications/misc/xpdf/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/applications/misc/xpdf/default.nix b/pkgs/applications/misc/xpdf/default.nix index 87c267bbff147..42622b62f61bf 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; @@ -22,7 +22,7 @@ stdenv.mkDerivation { # https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html patches = stdenv.lib.optional stdenv.isDarwin ./cmake_version.patch; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake makeWrapper ]; cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"]; @@ -36,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"; |