xpdf: fix a runtime error

'This application failed to start because it could not find or load the Qt platform plugin "cocoa" in "".'

+7 -2
+7 -2
pkgs/applications/misc/xpdf/default.nix
··· 1 { enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false 2 , stdenv, fetchurl, zlib, libpng, freetype ? null, t1lib ? null 3 - , cmake, qtbase ? null 4 }: 5 6 assert enableGUI -> qtbase != null && freetype != null; ··· 22 # https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html 23 patches = stdenv.lib.optional stdenv.isDarwin ./cmake_version.patch; 24 25 - nativeBuildInputs = [ cmake ]; 26 27 cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"]; 28 ··· 35 CXXFLAGS = "-O2 -fpermissive"; 36 37 hardeningDisable = [ "format" ]; 38 39 meta = { 40 homepage = http://www.foolabs.com/xpdf/;
··· 1 { enableGUI ? true, enablePDFtoPPM ? true, useT1Lib ? false 2 , stdenv, fetchurl, zlib, libpng, freetype ? null, t1lib ? null 3 + , cmake, qtbase ? null, makeWrapper 4 }: 5 6 assert enableGUI -> qtbase != null && freetype != null; ··· 22 # https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html 23 patches = stdenv.lib.optional stdenv.isDarwin ./cmake_version.patch; 24 25 + nativeBuildInputs = [ cmake makeWrapper ]; 26 27 cmakeFlags = ["-DSYSTEM_XPDFRC=/etc/xpdfrc" "-DA4_PAPER=ON"]; 28 ··· 35 CXXFLAGS = "-O2 -fpermissive"; 36 37 hardeningDisable = [ "format" ]; 38 + 39 + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' 40 + wrapProgram $out/bin/xpdf \ 41 + --set QT_QPA_PLATFORM_PLUGIN_PATH ${qtbase.bin}/lib/qt-*/plugins/platforms 42 + ''; 43 44 meta = { 45 homepage = http://www.foolabs.com/xpdf/;