about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorWeijia Wang2022-12-27 06:28:30 +0100
committerWeijia Wang2022-12-27 06:28:30 +0100
commitc2ea89836082775acfef4beb4526a022e6ad656d (patch)
tree7b5cc2791123c18c1c93396a2fdc6f9e225cb596 /pkgs/applications
parent338bf0b32595915b44f36d7257b0d868daad0e7a (diff)
opencpn: migrate to apple_sdk_11_0
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/opencpn/default.nix12
1 files changed, 7 insertions, 5 deletions
diff --git a/pkgs/applications/misc/opencpn/default.nix b/pkgs/applications/misc/opencpn/default.nix
index 590ca3304516..357f4fcd87e5 100644
--- a/pkgs/applications/misc/opencpn/default.nix
+++ b/pkgs/applications/misc/opencpn/default.nix
@@ -1,5 +1,7 @@
 { stdenv
 , lib
+, AppKit
+, DarwinTools
 , alsa-utils
 , at-spi2-core
 , cmake
@@ -59,12 +61,7 @@ stdenv.mkDerivation rec {
   ];
 
   postPatch = lib.optionalString stdenv.isDarwin ''
-    substituteInPlace cmake/TargetSetup.cmake \
-      --replace '"sw_vers" "-productVersion"' '"echo" "1"'
     sed -i '/fixup_bundle/d' CMakeLists.txt
-  '' + lib.optionalString (stdenv.isDarwin && stdenv.isx86_64) ''
-    substituteInPlace CMakeLists.txt \
-      --replace 'DARWIN_VERSION LESS 16' 'TRUE'
   '';
 
   nativeBuildInputs = [
@@ -73,6 +70,7 @@ stdenv.mkDerivation rec {
   ] ++ lib.optionals stdenv.isLinux [
     lsb-release
   ] ++ lib.optionals stdenv.isDarwin [
+    DarwinTools
     makeWrapper
   ];
 
@@ -81,6 +79,10 @@ stdenv.mkDerivation rec {
     curl
     dbus
     flac
+  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
+    # gtk3 propagates AppKit from the 10.12 SDK
+    AppKit
+  ] ++ [
     gtk3
     jasper
     libGLU