kdenlive: minor refactoring

This commit is contained in:
Tobias Bora
2024-07-04 14:43:36 +02:00
committed by K900
parent 9f38e1c714
commit 6e5b099e16
6 changed files with 33 additions and 49 deletions

View File

@@ -1,4 +1,5 @@
{ mkDerivation
, substituteAll
, lib
, extra-cmake-modules
, breeze-icons
@@ -83,23 +84,25 @@ mkDerivation {
wrapGAppsHook3
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 ./dependency-paths-glaxnimate.patch ];
# Needed to replace @glaxnimate@ by its path
env = {
inherit mediainfo glaxnimate;
ffmpeg = ffmpeg-full;
mlt = mlt-full;
};
patches = [
(
substituteAll {
src = ./dependency-paths.patch;
inherit mediainfo glaxnimate;
ffmpeg = ffmpeg-full;
mlt = mlt-full;
}
)
];
postPatch =
# Module Qt5::Concurrent must be included in `find_package` before it is used.
''
sed -i CMakeLists.txt -e '/find_package(Qt5 REQUIRED/ s|)| Concurrent)|'
substituteAllInPlace src/kdenlivesettings.kcfg
'';
dontWrapGApps = true;

View File

@@ -1,13 +0,0 @@
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 @@
<entry name="glaxnimatePath" type="String">
<label>Path to the Glaxnimate application.</label>
- <default></default>
+ <default>@glaxnimate@/bin/glaxnimate</default>
</entry>
<entry name="nice_tasks" type="Bool">

View File

@@ -1,6 +1,5 @@
diff --git a/src/kdenlivesettings.kcfg b/src/kdenlivesettings.kcfg
index 029849e5f..8befe4888 100644
--- a/src/kdenlivesettings.kcfg
diff -u b/src/kdenlivesettings.kcfg b/src/kdenlivesettings.kcfg
--- b/src/kdenlivesettings.kcfg
+++ b/src/kdenlivesettings.kcfg
@@ -517,7 +517,7 @@
<group name="env">
@@ -44,3 +43,10 @@ index 029849e5f..8befe4888 100644
</entry>
<entry name="processingthreads" type="Int">
@@ -657,5 +657,5 @@
<entry name="glaxnimatePath" type="String">
<label>Path to the Glaxnimate application.</label>
- <default></default>
+ <default>@glaxnimate@/bin/glaxnimate</default>
</entry>
<entry name="nice_tasks" type="Bool">

View File

@@ -14,7 +14,6 @@
frei0r,
fetchpatch,
glaxnimate,
enableGlaxnimate ? true,
}:
mkKdeDerivation {
pname = "kdenlive";
@@ -34,12 +33,7 @@ mkKdeDerivation {
url = "https://invent.kde.org/multimedia/kdenlive/-/commit/8be0e826471332bb739344ebe1859298c46e9e0f.patch";
hash = "sha256-5hLePH5NlO4Lx8lg9kjBPI4jTmP666RGplaVCmS/9TA=";
})
] ++ lib.optional enableGlaxnimate (
substituteAll {
src = ./dependency-paths-glaxnimate.patch;
inherit glaxnimate;
}
);
];
extraBuildInputs = [
qtsvg
@@ -51,7 +45,8 @@ mkKdeDerivation {
mlt
shared-mime-info
libv4l
] ++ lib.optional enableGlaxnimate glaxnimate;
glaxnimate
];
qtWrapperArgs = [
"--set FREI0R_PATH ${frei0r}/lib/frei0r-1"

View File

@@ -1,13 +0,0 @@
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 @@
<entry name="glaxnimatePath" type="String">
<label>Path to the Glaxnimate application.</label>
- <default></default>
+ <default>@glaxnimate@/bin/glaxnimate</default>
</entry>
<entry name="nice_tasks" type="Bool">

View File

@@ -1,6 +1,5 @@
diff --git a/src/kdenlivesettings.kcfg b/src/kdenlivesettings.kcfg
index 029849e5f..8befe4888 100644
--- a/src/kdenlivesettings.kcfg
diff -u b/src/kdenlivesettings.kcfg b/src/kdenlivesettings.kcfg
--- b/src/kdenlivesettings.kcfg
+++ b/src/kdenlivesettings.kcfg
@@ -517,7 +517,7 @@
<group name="env">
@@ -44,3 +43,10 @@ index 029849e5f..8befe4888 100644
</entry>
<entry name="processingthreads" type="Int">
@@ -657,5 +657,5 @@
<entry name="glaxnimatePath" type="String">
<label>Path to the Glaxnimate application.</label>
- <default></default>
+ <default>@glaxnimate@/bin/glaxnimate</default>
</entry>
<entry name="nice_tasks" type="Bool">