about summary refs log tree commit diff
path: root/pkgs/kde/gear/audiocd-kio
diff options
context:
space:
mode:
authorK900 <me@0upti.me>2024-02-05 18:43:41 +0300
committerK900 <me@0upti.me>2024-02-28 18:49:23 +0300
commitce77225e21f9cf8726d197897ad9a6882a3daecc (patch)
tree64d68e597c2a1875962305608ec42e3b02016b8a /pkgs/kde/gear/audiocd-kio
parentfc40d637fe78d717b7909e710ccb310458c2410f (diff)
pkgs/kde: init at 6.0.0 / 24.02.0, the Nix bits
This is the thing you want to look at.
Diffstat (limited to 'pkgs/kde/gear/audiocd-kio')
-rw-r--r--pkgs/kde/gear/audiocd-kio/default.nix24
-rw-r--r--pkgs/kde/gear/audiocd-kio/encoder-paths.patch35
2 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/kde/gear/audiocd-kio/default.nix b/pkgs/kde/gear/audiocd-kio/default.nix
new file mode 100644
index 0000000000000..c2f5c25588261
--- /dev/null
+++ b/pkgs/kde/gear/audiocd-kio/default.nix
@@ -0,0 +1,24 @@
+{
+  lib,
+  mkKdeDerivation,
+  cdparanoia,
+  flac,
+  libogg,
+  libvorbis,
+  substituteAll,
+  lame,
+  opusTools,
+}:
+mkKdeDerivation {
+  pname = "audiocd-kio";
+
+  patches = [
+    (substituteAll {
+      src = ./encoder-paths.patch;
+      lame = lib.getExe lame;
+      opusenc = "${opusTools}/bin/opusenc";
+    })
+  ];
+
+  extraBuildInputs = [cdparanoia flac libogg libvorbis];
+}
diff --git a/pkgs/kde/gear/audiocd-kio/encoder-paths.patch b/pkgs/kde/gear/audiocd-kio/encoder-paths.patch
new file mode 100644
index 0000000000000..c39835a8b1f30
--- /dev/null
+++ b/pkgs/kde/gear/audiocd-kio/encoder-paths.patch
@@ -0,0 +1,35 @@
+diff --git a/plugins/lame/encoderlame.cpp b/plugins/lame/encoderlame.cpp
+index 48d1d76..2643d6a 100644
+--- a/plugins/lame/encoderlame.cpp
++++ b/plugins/lame/encoderlame.cpp
+@@ -244,7 +244,7 @@ long EncoderLame::readInit(long /*size*/)
+ 
+     // -r raw/pcm
+     // -s 44.1 (because it is raw you have to specify this)
+-    *(d->currentEncodeProcess) << QStringLiteral("lame") << QStringLiteral("--verbose") << QStringLiteral("-r") << QStringLiteral("-s")
++    *(d->currentEncodeProcess) << QStringLiteral("@lame@") << QStringLiteral("--verbose") << QStringLiteral("-r") << QStringLiteral("-s")
+                                << QStringLiteral("44.1");
+     *(d->currentEncodeProcess) << args;
+     if (Settings::self()->id3_tag())
+diff --git a/plugins/opus/encoderopus.cpp b/plugins/opus/encoderopus.cpp
+index ef297fb..465bb3e 100644
+--- a/plugins/opus/encoderopus.cpp
++++ b/plugins/opus/encoderopus.cpp
+@@ -82,7 +82,7 @@ QWidget *EncoderOpus::getConfigureWidget(KConfigSkeleton **manager) const
+ bool EncoderOpus::init()
+ {
+     // Determine if opusenc is installed on the system or not.
+-    if (QStandardPaths::findExecutable(QStringLiteral("opusenc")).isEmpty())
++    if (QStandardPaths::findExecutable(QStringLiteral("@opusenc@")).isEmpty())
+         return false;
+ 
+     return true;
+@@ -140,7 +140,7 @@ long EncoderOpus::readInit(long /*size*/)
+ 
+     // --raw raw/pcm
+     // --raw-rate 44100 (because it is raw you have to specify this)
+-    *(d->currentEncodeProcess) << QStringLiteral("opusenc") << QStringLiteral("--raw") << QStringLiteral("--raw-rate") << QStringLiteral("44100");
++    *(d->currentEncodeProcess) << QStringLiteral("@opusenc@") << QStringLiteral("--raw") << QStringLiteral("--raw-rate") << QStringLiteral("44100");
+     *(d->currentEncodeProcess) << args;
+     *d->currentEncodeProcess << trackInfo;
+