From 2d63877fa4fae545bf8a890942baf6d4da762182 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Thu, 16 Aug 2018 21:56:36 -0500 Subject: [PATCH] wireshark: fix on darwin Need CMP0025 to be set. No way to do it from the command line (overrode by the cmake_minimimum_version policy). Fixes #44878 --- .../networking/sniffers/wireshark/cmake.patch | 19 ------------------- .../networking/sniffers/wireshark/default.nix | 7 +++++-- 2 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 pkgs/applications/networking/sniffers/wireshark/cmake.patch diff --git a/pkgs/applications/networking/sniffers/wireshark/cmake.patch b/pkgs/applications/networking/sniffers/wireshark/cmake.patch deleted file mode 100644 index 890fffedce03..000000000000 --- a/pkgs/applications/networking/sniffers/wireshark/cmake.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -19,6 +19,7 @@ - # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - # - -+cmake_minimum_required(VERSION 3.7) - project(Wireshark C CXX) - - # Updated by make-version.pl -@@ -40,7 +41,7 @@ - # Needed for GREATER_EQUAL operator - cmake_minimum_required(VERSION 3.7) - else() -- cmake_minimum_required(VERSION 2.8.8) -+ cmake_minimum_required(VERSION 3.7) - endif() - - # Needs to be set after cmake_minimum_required or cmake_policy(VERSION) diff --git a/pkgs/applications/networking/sniffers/wireshark/default.nix b/pkgs/applications/networking/sniffers/wireshark/default.nix index 850fdb0b715f..867768d9f9f1 100644 --- a/pkgs/applications/networking/sniffers/wireshark/default.nix +++ b/pkgs/applications/networking/sniffers/wireshark/default.nix @@ -49,8 +49,11 @@ in stdenv.mkDerivation { name = "fix-timeout.patch"; url = "https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commitdiff_plain;h=8b5b843fcbc3e03e0fc45f3caf8cf5fc477e8613;hp=94af9724d140fd132896b650d10c4d060788e4f0"; sha256 = "1g2dm7lwsnanwp68b9xr9swspx7hfj4v3z44sz3yrfmynygk8zlv"; - }) - ++ stdenv.lib.optional stdenv.isDarwin ./cmake.patch; + }); + + postPatch = '' + sed -i -e '1i cmake_policy(SET CMP0025 NEW)' CMakeLists.txt + ''; preBuild = '' export LD_LIBRARY_PATH="$PWD/run"