about summary refs log tree commit diff
path: root/pkgs/applications/graphics/rawtherapee
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2022-08-03 01:22:01 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2022-08-03 01:22:01 +0200
commit0e3350035ecd9fc52aa09401f9638b6e5d04b9f5 (patch)
treed83c84afdd2623a1092ecd65c8b4a9c02d2755fe /pkgs/applications/graphics/rawtherapee
parentd7007f3b80ddf624db0da015ec83d614825a34e4 (diff)
rawtherapee: add darwin support
Diffstat (limited to 'pkgs/applications/graphics/rawtherapee')
-rw-r--r--pkgs/applications/graphics/rawtherapee/default.nix14
-rw-r--r--pkgs/applications/graphics/rawtherapee/do-not-bundle.patch13
2 files changed, 23 insertions, 4 deletions
diff --git a/pkgs/applications/graphics/rawtherapee/default.nix b/pkgs/applications/graphics/rawtherapee/default.nix
index 494180fdb598d..c1f78b1807f00 100644
--- a/pkgs/applications/graphics/rawtherapee/default.nix
+++ b/pkgs/applications/graphics/rawtherapee/default.nix
@@ -1,6 +1,6 @@
 { lib, stdenv, fetchFromGitHub, pkg-config, cmake, pixman, libpthreadstubs, gtkmm3, libXau
 , libXdmcp, lcms2, libiptcdata, libcanberra-gtk3, fftw, expat, pcre, libsigcxx, wrapGAppsHook
-, lensfun, librsvg
+, lensfun, librsvg, gtk-mac-integration
 }:
 
 stdenv.mkDerivation rec {
@@ -17,11 +17,17 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake pkg-config wrapGAppsHook ];
 
   # This patch is upstream; remove it in 5.9.
-  patches = [ ./fix-6324.patch ];
+  patches = [ ./fix-6324.patch ]
+  # Disable upstream-enforced bundling on macOS.
+  ++ lib.optionals stdenv.isDarwin [ ./do-not-bundle.patch ];
 
   buildInputs = [
     pixman libpthreadstubs gtkmm3 libXau libXdmcp
-    lcms2 libiptcdata libcanberra-gtk3 fftw expat pcre libsigcxx lensfun librsvg
+    lcms2 libiptcdata fftw expat pcre libsigcxx lensfun librsvg
+  ] ++ lib.optionals stdenv.isLinux [
+    libcanberra-gtk3
+  ] ++ lib.optionals stdenv.isDarwin [
+    gtk-mac-integration
   ];
 
   cmakeFlags = [
@@ -40,6 +46,6 @@ stdenv.mkDerivation rec {
     homepage = "http://www.rawtherapee.com/";
     license = lib.licenses.gpl3Plus;
     maintainers = with lib.maintainers; [ jcumming mahe ];
-    platforms = with lib.platforms; linux;
+    platforms = with lib.platforms; unix;
   };
 }
diff --git a/pkgs/applications/graphics/rawtherapee/do-not-bundle.patch b/pkgs/applications/graphics/rawtherapee/do-not-bundle.patch
new file mode 100644
index 0000000000000..8c3257e888c57
--- /dev/null
+++ b/pkgs/applications/graphics/rawtherapee/do-not-bundle.patch
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0a55ca6d5..68c059aa5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -233,6 +233,6 @@ if(WIN32 OR APPLE)
+     endif()
+-    set(BUILD_BUNDLE ON FORCE)
++    set(BUILD_BUNDLE OFF)
+ endif()
+ 
+ if(NOT DEFINED BUNDLE_BASE_INSTALL_DIR)
+-    if(APPLE)
++    if(FALSE)