xpdf: fix build failure on darwin

convert the patch to substituteInPlace.

authored by

Vikram Narayanan and committed by
Anderson Torres
6ab8f2ae 062faf05

+4 -16
-15
pkgs/applications/misc/xpdf/cmake_version.patch
··· 1 - 2 - Fix "No known features for CXX compiler", see 3 - https://cmake.org/pipermail/cmake/2016-December/064733.html and the note at 4 - https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html 5 - --- a/CMakeLists.txt 6 - +++ b/CMakeLists.txt 7 - @@ -8,7 +8,7 @@ 8 - # 9 - #======================================================================== 10 - 11 - -cmake_minimum_required(VERSION 2.8.8) 12 - +cmake_minimum_required(VERSION 3.1.0) 13 - 14 - project(xpdf) 15 -
+4 -1
pkgs/applications/misc/xpdf/default.nix
··· 22 22 # Fix "No known features for CXX compiler", see 23 23 # https://cmake.org/pipermail/cmake/2016-December/064733.html and the note at 24 24 # https://cmake.org/cmake/help/v3.10/command/cmake_minimum_required.html 25 - patches = lib.optional stdenv.isDarwin ./cmake_version.patch; 25 + postPatch = lib.optionalString stdenv.isDarwin '' 26 + substituteInPlace CMakeLists.txt --replace \ 27 + 'cmake_minimum_required(VERSION 2.8.12)' 'cmake_minimum_required(VERSION 3.1.0)' 28 + ''; 26 29 27 30 nativeBuildInputs = 28 31 [ cmake ]