From 1bc8fd43108559c6ed29be85b2a4f7675d9c4312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Sat, 10 Aug 2024 12:13:58 -0400 Subject: [PATCH] shotcut: nixfmt --- pkgs/by-name/sh/shotcut/package.nix | 66 ++++++++++++++++------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/pkgs/by-name/sh/shotcut/package.nix b/pkgs/by-name/sh/shotcut/package.nix index 1ddd55a6368b..43142f0de489 100644 --- a/pkgs/by-name/sh/shotcut/package.nix +++ b/pkgs/by-name/sh/shotcut/package.nix @@ -1,19 +1,20 @@ -{ lib -, fetchFromGitHub -, stdenv -, substituteAll -, SDL2 -, frei0r -, ladspaPlugins -, gettext -, mlt -, jack1 -, pkg-config -, fftw -, qt6 -, cmake -, darwin -, gitUpdater +{ + lib, + fetchFromGitHub, + stdenv, + substituteAll, + SDL2, + frei0r, + ladspaPlugins, + gettext, + mlt, + jack1, + pkg-config, + fftw, + qt6, + cmake, + darwin, + gitUpdater, }: stdenv.mkDerivation (finalAttrs: { pname = "shotcut"; @@ -26,7 +27,12 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-9eQF3s4BAUK81/94z7cMkd2NWdNLVMraP08qsDmuAI8="; }; - nativeBuildInputs = [ pkg-config cmake qt6.wrapQtAppsHook ]; + nativeBuildInputs = [ + pkg-config + cmake + qt6.wrapQtAppsHook + ]; + buildInputs = [ SDL2 frei0r @@ -38,23 +44,24 @@ stdenv.mkDerivation (finalAttrs: { qt6.qttools qt6.qtmultimedia qt6.qtcharts - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.Cocoa - ]; + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]; env.NIX_CFLAGS_COMPILE = "-DSHOTCUT_NOUPGRADE"; - cmakeFlags = [ - "-DSHOTCUT_VERSION=${finalAttrs.version}" - ]; + cmakeFlags = [ "-DSHOTCUT_VERSION=${finalAttrs.version}" ]; patches = [ - (substituteAll { inherit mlt; src = ./fix-mlt-ffmpeg-path.patch; }) + (substituteAll { + inherit mlt; + src = ./fix-mlt-ffmpeg-path.patch; + }) ]; qtWrapperArgs = [ "--set FREI0R_PATH ${frei0r}/lib/frei0r-1" "--set LADSPA_PATH ${ladspaPlugins}/lib/ladspa" - "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath ([SDL2] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [jack1])}" + "--prefix LD_LIBRARY_PATH : ${ + lib.makeLibraryPath ([ SDL2 ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ jack1 ]) + }" ]; postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' @@ -63,9 +70,7 @@ stdenv.mkDerivation (finalAttrs: { ln -s $out/Applications/Shotcut.app/Contents/MacOS/Shotcut $out/bin/shotcut ''; - passthru.updateScript = gitUpdater { - rev-prefix = "v"; - }; + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; meta = with lib; { description = "Free, open source, cross-platform video editor"; @@ -80,7 +85,10 @@ stdenv.mkDerivation (finalAttrs: { ''; homepage = "https://shotcut.org"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ woffs peti ]; + maintainers = with maintainers; [ + woffs + peti + ]; platforms = platforms.unix; mainProgram = "shotcut"; };