From 56a66ce90a060146edd6117f9b0eecc885827dab Mon Sep 17 00:00:00 2001 From: Ram Kromberg Date: Sun, 27 Apr 2025 14:13:09 +0300 Subject: [PATCH] cantata: 2.5.0 -> 3.3.1 --- .../cantata/dont-check-for-perl-in-PATH.diff | 21 ++++++----- pkgs/by-name/ca/cantata/package.nix | 36 +++++++++++++------ 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/ca/cantata/dont-check-for-perl-in-PATH.diff b/pkgs/by-name/ca/cantata/dont-check-for-perl-in-PATH.diff index effb0f3b502c..3e1f1b83d0c8 100644 --- a/pkgs/by-name/ca/cantata/dont-check-for-perl-in-PATH.diff +++ b/pkgs/by-name/ca/cantata/dont-check-for-perl-in-PATH.diff @@ -1,17 +1,16 @@ diff --git a/playlists/dynamicplaylists.cpp b/playlists/dynamicplaylists.cpp -index 07b6dce3..6a3f97c9 100644 +index b85e93b5..3c29f775 100644 --- a/playlists/dynamicplaylists.cpp +++ b/playlists/dynamicplaylists.cpp -@@ -211,11 +211,6 @@ void DynamicPlaylists::start(const QString &name) - return; - } +@@ -205,11 +205,6 @@ void DynamicPlaylists::start(const QString& name) + return; + } -- 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.")); -- return; -- } +- 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.")); +- 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)) { diff --git a/pkgs/by-name/ca/cantata/package.nix b/pkgs/by-name/ca/cantata/package.nix index cb96570ca55b..db7fa65c00d3 100644 --- a/pkgs/by-name/ca/cantata/package.nix +++ b/pkgs/by-name/ca/cantata/package.nix @@ -4,7 +4,7 @@ fetchFromGitHub, cmake, pkg-config, - qt5, + qt6, perl, # Cantata doesn't build with cdparanoia enabled so we disable that @@ -22,6 +22,7 @@ taglib_1, taglib_extras, withHttpStream ? true, + gst_all_1, withReplaygain ? true, ffmpeg, speex, @@ -33,7 +34,7 @@ udisks2, withDynamic ? true, withHttpServer ? true, - withLibVlc ? false, + withLibVlc ? true, libvlc, withStreams ? true, }: @@ -53,6 +54,14 @@ let withUdisks = (withTaglib && withDevices && stdenv.hostPlatform.isLinux); + gst = with gst_all_1; [ + gstreamer + gst-libav + gst-plugins-base + gst-plugins-good + gst-plugins-bad + ]; + options = [ { names = [ "CDDB" ]; @@ -100,7 +109,7 @@ let { names = [ "HTTP_STREAM_PLAYBACK" ]; enable = withHttpStream; - pkgs = [ qt5.qtmultimedia ]; + pkgs = [ qt6.qtmultimedia ]; } { names = [ "LAME" ]; @@ -153,13 +162,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "cantata"; - version = "2.5.0"; + version = "3.3.1"; src = fetchFromGitHub { - owner = "CDrummond"; + owner = "nullobsi"; repo = "cantata"; rev = "v${finalAttrs.version}"; - hash = "sha256-UaZEKZvCA50WsdQSSJQQ11KTK6rM4ouCHDX7pn3NlQw="; + hash = "sha256-4lkfY+87lEE2A863JogG5PtO5SyGn7Hb8shQljSqq3Q="; }; patches = [ @@ -174,24 +183,29 @@ stdenv.mkDerivation (finalAttrs: { ''; buildInputs = [ - qt5.qtbase - qt5.qtsvg + qt6.qtbase + qt6.qtsvg + qt6.qtwayland (perl.withPackages (ppkgs: with ppkgs; [ URI ])) ] ++ lib.flatten (builtins.catAttrs "pkgs" (builtins.filter (e: e.enable) options)); nativeBuildInputs = [ cmake pkg-config - qt5.qttools - qt5.wrapQtAppsHook + qt6.qttools + qt6.wrapQtAppsHook ]; 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 = { description = "Graphical client for MPD"; mainProgram = "cantata"; - homepage = "https://github.com/cdrummond/cantata"; + homepage = "https://github.com/nullobsi/cantata"; license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ peterhoeg ]; # Technically, Cantata should run on Darwin/Windows so if someone wants to