From a7fe17bc8a7092c5128d749ee0ed8d8c1104ded9 Mon Sep 17 00:00:00 2001 From: Emily Trau Date: Sun, 3 Mar 2024 23:24:42 +1100 Subject: [PATCH 1/2] ladspaPlugins: enable darwin support --- pkgs/applications/audio/ladspa-plugins/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/ladspa-plugins/default.nix b/pkgs/applications/audio/ladspa-plugins/default.nix index 491a18bba3ea..d7e7dd7b6947 100644 --- a/pkgs/applications/audio/ladspa-plugins/default.nix +++ b/pkgs/applications/audio/ladspa-plugins/default.nix @@ -33,8 +33,8 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "http://plugin.org.uk/"; description = "LADSPA format audio plugins"; - license = licenses.gpl2; + license = licenses.gpl2Only; maintainers = [ maintainers.magnetophon ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } From b2a170ca8ae89b50a41885ec9ce81250cf5a547c Mon Sep 17 00:00:00 2001 From: Emily Trau Date: Mon, 4 Mar 2024 12:17:48 +1100 Subject: [PATCH 2/2] shotcut: 24.02.19 -> 24.02.29, support darwin --- pkgs/applications/video/shotcut/default.nix | 25 ++++++++++++++------- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/video/shotcut/default.nix b/pkgs/applications/video/shotcut/default.nix index ca3c0599a626..8678c456b07f 100644 --- a/pkgs/applications/video/shotcut/default.nix +++ b/pkgs/applications/video/shotcut/default.nix @@ -16,17 +16,18 @@ , qtmultimedia , qtcharts , cmake +, Cocoa , gitUpdater }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "shotcut"; - version = "24.02.19"; + version = "24.02.29"; src = fetchFromGitHub { owner = "mltframework"; repo = "shotcut"; - rev = "v${version}"; - hash = "sha256-fjm2gqbuLKj6YyAZGgbfWUd+JOM9/Fhvpfz0E+TaqY0="; + rev = "v${finalAttrs.version}"; + hash = "sha256-PHpVquqC0MT7WNoWcdB9WTz4ZiSK4/f4oD5PH1gWBnw="; }; nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook ]; @@ -41,11 +42,13 @@ stdenv.mkDerivation rec { qttools qtmultimedia qtcharts + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ + Cocoa ]; env.NIX_CFLAGS_COMPILE = "-DSHOTCUT_NOUPGRADE"; cmakeFlags = [ - "-DSHOTCUT_VERSION=${version}" + "-DSHOTCUT_VERSION=${finalAttrs.version}" ]; patches = [ @@ -55,9 +58,15 @@ stdenv.mkDerivation rec { qtWrapperArgs = [ "--set FREI0R_PATH ${frei0r}/lib/frei0r-1" "--set LADSPA_PATH ${ladspaPlugins}/lib/ladspa" - "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [jack1 SDL2]}" + "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([SDL2] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [jack1])}" ]; + postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' + mkdir $out/Applications $out/bin + mv $out/Shotcut.app $out/Applications/Shotcut.app + ln -s $out/Applications/Shotcut.app/Contents/MacOS/Shotcut $out/bin/shotcut + ''; + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; @@ -76,7 +85,7 @@ stdenv.mkDerivation rec { homepage = "https://shotcut.org"; license = licenses.gpl3Plus; maintainers = with maintainers; [ goibhniu woffs peti ]; - platforms = platforms.linux; + platforms = platforms.unix; mainProgram = "shotcut"; }; -} +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 689a49324583..e372e9352272 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33851,7 +33851,9 @@ with pkgs; shod = callPackage ../applications/window-managers/shod { }; - shotcut = qt6Packages.callPackage ../applications/video/shotcut { }; + shotcut = qt6Packages.callPackage ../applications/video/shotcut { + inherit (darwin.apple_sdk.frameworks) Cocoa; + }; shogun = callPackage ../applications/science/machine-learning/shogun { protobuf = protobuf_21;