From 0e3350035ecd9fc52aa09401f9638b6e5d04b9f5 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 3 Aug 2022 01:22:01 +0200 Subject: [PATCH] rawtherapee: add darwin support --- pkgs/applications/graphics/rawtherapee/default.nix | 14 ++++++++++---- .../graphics/rawtherapee/do-not-bundle.patch | 13 +++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 pkgs/applications/graphics/rawtherapee/do-not-bundle.patch diff --git a/pkgs/applications/graphics/rawtherapee/default.nix b/pkgs/applications/graphics/rawtherapee/default.nix index 494180fdb59..c1f78b1807f 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 00000000000..8c3257e888c --- /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)