diff --git a/pkgs/applications/kde/kdenlive/default.nix b/pkgs/applications/kde/kdenlive/default.nix index 85ccfb0f7408..caf0f1c6f55d 100644 --- a/pkgs/applications/kde/kdenlive/default.nix +++ b/pkgs/applications/kde/kdenlive/default.nix @@ -34,6 +34,8 @@ , kpurpose , kdeclarative , wrapGAppsHook3 +, glaxnimate +, enableGlaxnimate ? true }: let @@ -80,15 +82,18 @@ mkDerivation { kpurpose kdeclarative wrapGAppsHook3 - ]; + ] ++ lib.optional enableGlaxnimate glaxnimate; # Both MLT and FFMpeg paths must be set or Kdenlive will complain that it # doesn't find them. See: # https://github.com/NixOS/nixpkgs/issues/83885 - patches = [ ./dependency-paths.patch ]; + patches = [ ./dependency-paths.patch ] ++ lib.optional enableGlaxnimate ./dependency-paths-glaxnimate.patch; - inherit mediainfo; - ffmpeg = ffmpeg-full; - mlt = mlt-full; + # Needed to replace @glaxnimate@ by its path + env = { + inherit mediainfo glaxnimate; + ffmpeg = ffmpeg-full; + mlt = mlt-full; + }; postPatch = # Module Qt5::Concurrent must be included in `find_package` before it is used. diff --git a/pkgs/applications/kde/kdenlive/dependency-paths-glaxnimate.patch b/pkgs/applications/kde/kdenlive/dependency-paths-glaxnimate.patch new file mode 100644 index 000000000000..17d7ddfcee96 --- /dev/null +++ b/pkgs/applications/kde/kdenlive/dependency-paths-glaxnimate.patch @@ -0,0 +1,13 @@ +diff --git a/src/kdenlivesettings.kcfg b/src/kdenlivesettings.kcfg +index 86fa5ef..6aeccbe 100644 +--- a/src/kdenlivesettings.kcfg ++++ b/src/kdenlivesettings.kcfg +@@ -657,7 +657,7 @@ + + + +- ++ @glaxnimate@/bin/glaxnimate + + + \ No newline at end of file diff --git a/pkgs/development/libraries/mlt/default.nix b/pkgs/development/libraries/mlt/default.nix index af397eb3c5c2..cb7a438c8a8f 100644 --- a/pkgs/development/libraries/mlt/default.nix +++ b/pkgs/development/libraries/mlt/default.nix @@ -36,6 +36,8 @@ , enableSDL2 ? true , SDL2 , gitUpdater +, enableGlaxnimate ? true +, libarchive }: stdenv.mkDerivation rec { @@ -46,7 +48,11 @@ stdenv.mkDerivation rec { owner = "mltframework"; repo = "mlt"; rev = "v${version}"; - hash = "sha256-nQ9uRip6i9+/MziU4gQq1ah712J6f94cFQWTDYRjzyE="; + hash = "sha256-rs02V6+9jMF0S78rCCXcDn3gzghqnOtWEHMo/491JxA="; + # The submodule contains glaxnimate code, since MLT uses internally some functions defined in glaxnimate. + # Since glaxnimate is not available as a library upstream, we cannot remove for now this dependency on + # submodules until upstream exports glaxnimate as a library: https://gitlab.com/mattbas/glaxnimate/-/issues/545 + fetchSubmodules = true; }; nativeBuildInputs = [ @@ -94,6 +100,8 @@ stdenv.mkDerivation rec { SDL ] ++ lib.optionals enableSDL2 [ SDL2 + ] ++ lib.optionals enableGlaxnimate [ + libarchive ]; outputs = [ "out" "dev" ]; @@ -106,6 +114,8 @@ stdenv.mkDerivation rec { "-DSWIG_PYTHON=ON" ] ++ lib.optionals (qt != null) [ "-DMOD_QT${lib.versions.major qt.qtbase.version}=ON" + ] ++ lib.optionals enableGlaxnimate [ + "-DMOD_GLAXNIMATE=ON" ]; preFixup = ''