From c874cd0b3825124a3b067f7f8db4f060f209956c Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 27 Dec 2022 11:32:47 +0100 Subject: libsForQt5.libopenshot-audio: unbreak on aarch64-darwin --- pkgs/applications/video/openshot-qt/libopenshot-audio.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pkgs/applications/video') diff --git a/pkgs/applications/video/openshot-qt/libopenshot-audio.nix b/pkgs/applications/video/openshot-qt/libopenshot-audio.nix index bf77e8a8f0da1..a5f3cbf1fda25 100644 --- a/pkgs/applications/video/openshot-qt/libopenshot-audio.nix +++ b/pkgs/applications/video/openshot-qt/libopenshot-audio.nix @@ -28,6 +28,12 @@ stdenv.mkDerivation rec { sha256 = "sha256-XtwTZsj/L/sw/28E7Qr5UyghGlBFFXvbmZLGXBB8vg0="; }; + # https://github.com/OpenShot/libopenshot-audio/issues/112 + postPatch = '' + substituteInPlace JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h \ + --replace "#if ! JUCE_IOS" "#if ! JUCE_IOS && ! JUCE_ARM" + ''; + nativeBuildInputs = [ cmake doxygen @@ -63,7 +69,5 @@ stdenv.mkDerivation rec { license = with licenses; gpl3Plus; maintainers = with maintainers; [ AndersonTorres ]; platforms = with platforms; unix; - # never built on aarch64-darwin since first introduction in nixpkgs - broken = stdenv.isDarwin && stdenv.isAarch64; }; } -- cgit 1.4.1 From abc198bf73e5ded6f1eebb4982596f114d1186ba Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 27 Dec 2022 11:33:13 +0100 Subject: libsForQt5.libopenshot: add darwin support --- pkgs/applications/video/openshot-qt/libopenshot.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkgs/applications/video') diff --git a/pkgs/applications/video/openshot-qt/libopenshot.nix b/pkgs/applications/video/openshot-qt/libopenshot.nix index 8a98010ef642b..22ed82fd3d0b7 100644 --- a/pkgs/applications/video/openshot-qt/libopenshot.nix +++ b/pkgs/applications/video/openshot-qt/libopenshot.nix @@ -35,8 +35,9 @@ stdenv.mkDerivation rec { export _REL_PYTHON_MODULE_PATH=$(toPythonPath $out) ''; - nativeBuildInputs = [ + nativeBuildInputs = lib.optionals stdenv.isLinux [ alsa-lib + ] ++ [ cmake doxygen pkg-config -- cgit 1.4.1 From d1b54838bd6bd1c9ecaea34ec5c5b02edcf5ae1c Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 28 Dec 2022 14:39:41 +0100 Subject: libsForQt5.libopenshot-audio: convert to patch --- pkgs/applications/video/openshot-qt/libopenshot-audio.nix | 10 +++++----- .../video/openshot-qt/undef-fpret-on-aarch64-darwin.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 pkgs/applications/video/openshot-qt/undef-fpret-on-aarch64-darwin.patch (limited to 'pkgs/applications/video') diff --git a/pkgs/applications/video/openshot-qt/libopenshot-audio.nix b/pkgs/applications/video/openshot-qt/libopenshot-audio.nix index a5f3cbf1fda25..438eae4670980 100644 --- a/pkgs/applications/video/openshot-qt/libopenshot-audio.nix +++ b/pkgs/applications/video/openshot-qt/libopenshot-audio.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , alsa-lib , cmake , doxygen @@ -28,11 +29,10 @@ stdenv.mkDerivation rec { sha256 = "sha256-XtwTZsj/L/sw/28E7Qr5UyghGlBFFXvbmZLGXBB8vg0="; }; - # https://github.com/OpenShot/libopenshot-audio/issues/112 - postPatch = '' - substituteInPlace JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h \ - --replace "#if ! JUCE_IOS" "#if ! JUCE_IOS && ! JUCE_ARM" - ''; + patches = [ + # https://forum.juce.com/t/juce-and-macos-11-arm/40285/24 + ./undef-fpret-on-aarch64-darwin.patch + ]; nativeBuildInputs = [ cmake diff --git a/pkgs/applications/video/openshot-qt/undef-fpret-on-aarch64-darwin.patch b/pkgs/applications/video/openshot-qt/undef-fpret-on-aarch64-darwin.patch new file mode 100644 index 0000000000000..c391f77dda8b7 --- /dev/null +++ b/pkgs/applications/video/openshot-qt/undef-fpret-on-aarch64-darwin.patch @@ -0,0 +1,13 @@ +diff --git a/JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h b/JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h +index 2593790..0b5983d 100644 +--- a/JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h ++++ b/JuceLibraryCode/modules/juce_core/native/juce_osx_ObjCHelpers.h +@@ -209,7 +209,7 @@ static inline ReturnValue ObjCMsgSendSuper (struct objc_super* s, SEL sel, Param + typedef id (*MsgSendSuperFn) (struct objc_super*, SEL, ...); + static inline MsgSendSuperFn getMsgSendSuperFn() noexcept { return (MsgSendSuperFn) (void*) objc_msgSendSuper; } + +-#if ! JUCE_IOS ++#if JUCE_INTEL && ! JUCE_IOS + typedef double (*MsgSendFPRetFn) (id, SEL op, ...); + static inline MsgSendFPRetFn getMsgSendFPRetFn() noexcept { return (MsgSendFPRetFn) (void*) objc_msgSend_fpret; } + #endif -- cgit 1.4.1