diff --git a/pkgs/development/tools/osslsigncode/darwin-cmake.patch b/pkgs/development/tools/osslsigncode/darwin-cmake.patch deleted file mode 100644 index 477a81c9c399..000000000000 --- a/pkgs/development/tools/osslsigncode/darwin-cmake.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/cmake/SetCompilerFlags.cmake b/cmake/SetCompilerFlags.cmake -index 8e83390..bd734f0 100644 ---- a/cmake/SetCompilerFlags.cmake -+++ b/cmake/SetCompilerFlags.cmake -@@ -98,13 +98,13 @@ function(add_compile_flags target) - endif() - endif() - # Support address space layout randomization (ASLR) -- if(NOT (MINGW OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")) -+ if(NOT (MINGW OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR ((CMAKE_SYSTEM_NAME MATCHES Darwin) AND (CMAKE_C_COMPILER_ID MATCHES Clang)))) - target_compile_options(${target} PRIVATE -fPIE) - target_link_options(${target} PRIVATE -fPIE -pie) - target_link_options(${target} PRIVATE -Wl,-z,relro) - target_link_options(${target} PRIVATE -Wl,-z,now) - target_link_options(${target} PRIVATE -Wl,-z,noexecstack) -- endif(NOT (MINGW OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")) -+ endif(NOT (MINGW OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR ((CMAKE_SYSTEM_NAME MATCHES Darwin) AND (CMAKE_C_COMPILER_ID MATCHES Clang)))) - target_link_options(${target} PRIVATE -fstack-check) - add_compile_flag_to_targets(${target}) - endif(MSVC) diff --git a/pkgs/development/tools/osslsigncode/default.nix b/pkgs/development/tools/osslsigncode/default.nix index b0407c96eec1..4738ccd74a9c 100644 --- a/pkgs/development/tools/osslsigncode/default.nix +++ b/pkgs/development/tools/osslsigncode/default.nix @@ -2,6 +2,7 @@ , stdenv , fetchFromGitHub , cmake +, fetchpatch , pkg-config , curl , openssl @@ -18,7 +19,18 @@ stdenv.mkDerivation rec { sha256 = "sha256-33uT9PFD1YEIMzifZkpbl2EAoC98IsM72K4rRjDfh8g="; }; - patches = [ ./darwin-cmake.patch ]; + patches = [ + # Cygwin patch is prereq for Darwin fix applying -- committed to master after 2.5 release + (fetchpatch { + url = "https://github.com/mtrojnar/osslsigncode/commit/1c678bf926b78c947b14c46c3ce88e06268c738e.patch"; + sha256 = "sha256-vOBMGIJ3PHJTvmsXRRfAUJRi7P929PcfmrUiRuM0pf4="; + }) + # Fix build on Darwin when clang not identified as Apple (https://github.com/mtrojnar/osslsigncode/pull/247) + (fetchpatch { + url = "https://github.com/charles-dyfis-net/osslsigncode/commit/b2ed89b35c8a26faa7eb6515fecaff3c4c5f7fed.patch"; + sha256 = "sha256-FGKZK/IzHbbkTzSoAtpC75z79d5+qQvvJrjEDY31WJ0="; + }) + ]; nativeBuildInputs = [ cmake pkg-config ];