From 6ab8f2aea546012da7d72fdf55aa7ce650a3cb21 Mon Sep 17 00:00:00 2001 From: Vikram Narayanan Date: Fri, 21 Apr 2023 12:41:25 -0700 Subject: [PATCH] xpdf: fix build failure on darwin convert the patch to substituteInPlace. --- pkgs/applications/misc/xpdf/cmake_version.patch | 15 --------------- pkgs/applications/misc/xpdf/default.nix | 5 ++++- 2 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 pkgs/applications/misc/xpdf/cmake_version.patch diff --git a/pkgs/applications/misc/xpdf/cmake_version.patch b/pkgs/applications/misc/xpdf/cmake_version.patch deleted file mode 100644 index 59a51f7506d5..000000000000 --- 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 58c0c066d838..168db4e3bd93 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 ]