summary refs log tree commit diff
path: root/pkgs/applications/misc/xpdf
diff options
context:
space:
mode:
authorVikram Narayanan <vikram186@gmail.com>2023-04-21 12:41:25 -0700
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-05-03 17:03:25 -0300
commit6ab8f2aea546012da7d72fdf55aa7ce650a3cb21 (patch)
tree502401ee55689c5267b9037b020ec25f378a0b65 /pkgs/applications/misc/xpdf
parent062faf05259e357b4655e159536382e2dd488b57 (diff)
downloadnixpkgs-6ab8f2aea546012da7d72fdf55aa7ce650a3cb21.tar
nixpkgs-6ab8f2aea546012da7d72fdf55aa7ce650a3cb21.tar.gz
nixpkgs-6ab8f2aea546012da7d72fdf55aa7ce650a3cb21.tar.bz2
nixpkgs-6ab8f2aea546012da7d72fdf55aa7ce650a3cb21.tar.lz
nixpkgs-6ab8f2aea546012da7d72fdf55aa7ce650a3cb21.tar.xz
nixpkgs-6ab8f2aea546012da7d72fdf55aa7ce650a3cb21.tar.zst
nixpkgs-6ab8f2aea546012da7d72fdf55aa7ce650a3cb21.zip
xpdf: fix build failure on darwin
convert the patch to substituteInPlace.
Diffstat (limited to 'pkgs/applications/misc/xpdf')
-rw-r--r--pkgs/applications/misc/xpdf/cmake_version.patch15
-rw-r--r--pkgs/applications/misc/xpdf/default.nix5
2 files changed, 4 insertions, 16 deletions
diff --git a/pkgs/applications/misc/xpdf/cmake_version.patch b/pkgs/applications/misc/xpdf/cmake_version.patch
deleted file mode 100644
index 59a51f7506d..00000000000
--- a/pkgs/applications/misc/xpdf/cmake_version.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-
-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 58c0c066d83..168db4e3bd9 100644
--- a/pkgs/applications/misc/xpdf/default.nix
+++ b/pkgs/applications/misc/xpdf/default.nix
@@ -22,7 +22,10 @@ stdenv.mkDerivation rec {
   # 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 = lib.optional stdenv.isDarwin  ./cmake_version.patch;
+  postPatch = lib.optionalString stdenv.isDarwin ''
+    substituteInPlace CMakeLists.txt --replace \
+        'cmake_minimum_required(VERSION 2.8.12)' 'cmake_minimum_required(VERSION 3.1.0)'
+    '';
 
   nativeBuildInputs =
     [ cmake ]