cantata: 2.5.0 -> 3.3.1

This commit is contained in:
Ram Kromberg 2025-04-27 14:13:09 +03:00
parent 61fcc28b45
commit 56a66ce90a
2 changed files with 35 additions and 22 deletions

View file

@ -1,17 +1,16 @@
diff --git a/playlists/dynamicplaylists.cpp b/playlists/dynamicplaylists.cpp diff --git a/playlists/dynamicplaylists.cpp b/playlists/dynamicplaylists.cpp
index 07b6dce3..6a3f97c9 100644 index b85e93b5..3c29f775 100644
--- a/playlists/dynamicplaylists.cpp --- a/playlists/dynamicplaylists.cpp
+++ b/playlists/dynamicplaylists.cpp +++ b/playlists/dynamicplaylists.cpp
@@ -211,11 +211,6 @@ void DynamicPlaylists::start(const QString &name) @@ -205,11 +205,6 @@ void DynamicPlaylists::start(const QString& name)
return; return;
} }
- if (Utils::findExe("perl").isEmpty()) { - if (Utils::findExe("perl").isEmpty()) {
- emit error(tr("You need to install \"perl\" on your system in order for Cantata's dynamic mode to function.")); - emit error(tr("You need to install \"perl\" on your system in order for Cantata's dynamic mode to function."));
- return; - return;
- } - }
- -
QString fName(Utils::dataDir(rulesDir, false)+name+constExtension); QString fName(Utils::dataDir(rulesDir, false) + name + constExtension);
if (!QFile::exists(fName)) { if (!QFile::exists(fName)) {

View file

@ -4,7 +4,7 @@
fetchFromGitHub, fetchFromGitHub,
cmake, cmake,
pkg-config, pkg-config,
qt5, qt6,
perl, perl,
# Cantata doesn't build with cdparanoia enabled so we disable that # Cantata doesn't build with cdparanoia enabled so we disable that
@ -22,6 +22,7 @@
taglib_1, taglib_1,
taglib_extras, taglib_extras,
withHttpStream ? true, withHttpStream ? true,
gst_all_1,
withReplaygain ? true, withReplaygain ? true,
ffmpeg, ffmpeg,
speex, speex,
@ -33,7 +34,7 @@
udisks2, udisks2,
withDynamic ? true, withDynamic ? true,
withHttpServer ? true, withHttpServer ? true,
withLibVlc ? false, withLibVlc ? true,
libvlc, libvlc,
withStreams ? true, withStreams ? true,
}: }:
@ -53,6 +54,14 @@ let
withUdisks = (withTaglib && withDevices && stdenv.hostPlatform.isLinux); withUdisks = (withTaglib && withDevices && stdenv.hostPlatform.isLinux);
gst = with gst_all_1; [
gstreamer
gst-libav
gst-plugins-base
gst-plugins-good
gst-plugins-bad
];
options = [ options = [
{ {
names = [ "CDDB" ]; names = [ "CDDB" ];
@ -100,7 +109,7 @@ let
{ {
names = [ "HTTP_STREAM_PLAYBACK" ]; names = [ "HTTP_STREAM_PLAYBACK" ];
enable = withHttpStream; enable = withHttpStream;
pkgs = [ qt5.qtmultimedia ]; pkgs = [ qt6.qtmultimedia ];
} }
{ {
names = [ "LAME" ]; names = [ "LAME" ];
@ -153,13 +162,13 @@ let
in in
stdenv.mkDerivation (finalAttrs: { stdenv.mkDerivation (finalAttrs: {
pname = "cantata"; pname = "cantata";
version = "2.5.0"; version = "3.3.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "CDrummond"; owner = "nullobsi";
repo = "cantata"; repo = "cantata";
rev = "v${finalAttrs.version}"; rev = "v${finalAttrs.version}";
hash = "sha256-UaZEKZvCA50WsdQSSJQQ11KTK6rM4ouCHDX7pn3NlQw="; hash = "sha256-4lkfY+87lEE2A863JogG5PtO5SyGn7Hb8shQljSqq3Q=";
}; };
patches = [ patches = [
@ -174,24 +183,29 @@ stdenv.mkDerivation (finalAttrs: {
''; '';
buildInputs = [ buildInputs = [
qt5.qtbase qt6.qtbase
qt5.qtsvg qt6.qtsvg
qt6.qtwayland
(perl.withPackages (ppkgs: with ppkgs; [ URI ])) (perl.withPackages (ppkgs: with ppkgs; [ URI ]))
] ++ lib.flatten (builtins.catAttrs "pkgs" (builtins.filter (e: e.enable) options)); ] ++ lib.flatten (builtins.catAttrs "pkgs" (builtins.filter (e: e.enable) options));
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
pkg-config pkg-config
qt5.qttools qt6.qttools
qt5.wrapQtAppsHook qt6.wrapQtAppsHook
]; ];
cmakeFlags = lib.flatten (map (e: map (f: fstat e.enable f) e.names) options); cmakeFlags = lib.flatten (map (e: map (f: fstat e.enable f) e.names) options);
qtWrapperArgs = lib.optionals (withHttpStream && !withLibVlc) [
"--prefix GST_PLUGIN_PATH : ${lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" gst}"
];
meta = { meta = {
description = "Graphical client for MPD"; description = "Graphical client for MPD";
mainProgram = "cantata"; mainProgram = "cantata";
homepage = "https://github.com/cdrummond/cantata"; homepage = "https://github.com/nullobsi/cantata";
license = lib.licenses.gpl3Only; license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ peterhoeg ]; maintainers = with lib.maintainers; [ peterhoeg ];
# Technically, Cantata should run on Darwin/Windows so if someone wants to # Technically, Cantata should run on Darwin/Windows so if someone wants to