diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2018-03-01 22:05:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-01 22:05:28 +0100 |
commit | 6d685a5b0fe870ddb68678a7c064362bba5ceb05 (patch) | |
tree | a6906c530cb79c7ac19d8ec408b71ec927d2eb8d | |
parent | e05c99cfda7030f7836ddc6b651ba494f4a3f7d2 (diff) | |
parent | ea66292a1615a1455ccdf0b8a3641bc5f02ca14b (diff) | |
download | nixlib-6d685a5b0fe870ddb68678a7c064362bba5ceb05.tar nixlib-6d685a5b0fe870ddb68678a7c064362bba5ceb05.tar.gz nixlib-6d685a5b0fe870ddb68678a7c064362bba5ceb05.tar.bz2 nixlib-6d685a5b0fe870ddb68678a7c064362bba5ceb05.tar.lz nixlib-6d685a5b0fe870ddb68678a7c064362bba5ceb05.tar.xz nixlib-6d685a5b0fe870ddb68678a7c064362bba5ceb05.tar.zst nixlib-6d685a5b0fe870ddb68678a7c064362bba5ceb05.zip |
Merge pull request #36177 from veprbl/xpdf_fixes
fix Xpdf on darwin
-rw-r--r-- | pkgs/applications/misc/xpdf/cmake_version.patch | 15 | ||||
-rw-r--r-- | pkgs/applications/misc/xpdf/default.nix | 14 |
2 files changed, 27 insertions, 2 deletions
diff --git a/pkgs/applications/misc/xpdf/cmake_version.patch b/pkgs/applications/misc/xpdf/cmake_version.patch new file mode 100644 index 000000000000..59a51f7506d5 --- /dev/null +++ b/pkgs/applications/misc/xpdf/cmake_version.patch @@ -0,0 +1,15 @@ + +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 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,7 +8,7 @@ + # + #======================================================================== + +-cmake_minimum_required(VERSION 2.8.8) ++cmake_minimum_required(VERSION 3.1.0) + + project(xpdf) + 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"; |