use qt6 cantata fork
package pulled from nixpkgs issue
This commit is contained in:
parent
4f6b9c55e1
commit
590618a5bc
4 changed files with 192 additions and 1 deletions
41
modules/overlay-pkgs/cantata/cantata-projectid.diff
Normal file
41
modules/overlay-pkgs/cantata/cantata-projectid.diff
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 11fd7d06..5892d19f 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -10,8 +10,8 @@ project(
|
||||||
|
|
||||||
|
# NOTE: If PROJECT_URL, or PROJECT_REV_URL, are changed, then cantata-dynamic, README, and
|
||||||
|
# dbus/mpd.cantata.xml will need renaming/updating.
|
||||||
|
-set(PROJECT_ID "Cantata.cantata.unix.dog")
|
||||||
|
-set(PROJECT_REV_ID "dog.unix.cantata.Cantata")
|
||||||
|
+set(PROJECT_ID "cantata.mpd")
|
||||||
|
+set(PROJECT_REV_ID "mpd.cantata")
|
||||||
|
set(EXECUTABLE_NAME "cantata")
|
||||||
|
|
||||||
|
message(STATUS "Configuring ${PROJECT_NAME} v${PROJECT_VERSION}")
|
||||||
|
diff --git a/cantata.desktop.cmake b/cantata.desktop.cmake
|
||||||
|
index b6c63f86..72f541e8 100644
|
||||||
|
--- a/cantata.desktop.cmake
|
||||||
|
+++ b/cantata.desktop.cmake
|
||||||
|
@@ -29,7 +29,7 @@ GenericName[sq]=Clienti player muzike
|
||||||
|
GenericName[tr]=Muzik Çalıcı İstemcisi
|
||||||
|
|
||||||
|
|
||||||
|
-Icon=@PROJECT_REV_ID@
|
||||||
|
+Icon=cantata
|
||||||
|
Exec=@EXECUTABLE_NAME@
|
||||||
|
Terminal=false
|
||||||
|
|
||||||
|
diff --git a/gui/trayitem.cpp b/gui/trayitem.cpp
|
||||||
|
index 8514ba00..2ca34468 100644
|
||||||
|
--- a/gui/trayitem.cpp
|
||||||
|
+++ b/gui/trayitem.cpp
|
||||||
|
@@ -145,7 +145,7 @@ void TrayItem::setup()
|
||||||
|
QIcon icon;
|
||||||
|
icon.addFile(CANTATA_SYS_ICONS_DIR + PROJECT_REV_ID ".png");
|
||||||
|
#else
|
||||||
|
- QIcon icon = QIcon::fromTheme(Utils::Gnome == Utils::currentDe() ? PROJECT_REV_ID "-symbolic" : PROJECT_REV_ID);
|
||||||
|
+ QIcon icon = QIcon::fromTheme(Utils::Gnome == Utils::currentDe() ? "cantata-symbolic" : "cantata");
|
||||||
|
// Bug: 660 If installed to non-standard folder, QIcon::fromTheme does not seem to find icon. Therefore
|
||||||
|
// add icon files here...
|
||||||
|
if (icon.isNull()) {
|
133
modules/overlay-pkgs/cantata/default.nix
Normal file
133
modules/overlay-pkgs/cantata/default.nix
Normal file
|
@ -0,0 +1,133 @@
|
||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, pkg-config
|
||||||
|
, qtbase
|
||||||
|
, qtsvg
|
||||||
|
, qttools
|
||||||
|
, qtwayland
|
||||||
|
, wrapQtAppsHook
|
||||||
|
, perl
|
||||||
|
|
||||||
|
# Cantata doesn't build with cdparanoia enabled so we disable that
|
||||||
|
# default for now until I (or someone else) figure it out.
|
||||||
|
, withCdda ? false
|
||||||
|
, cdparanoia
|
||||||
|
, withCddb ? false
|
||||||
|
, libcddb
|
||||||
|
, withLame ? false
|
||||||
|
, lame
|
||||||
|
, withMusicbrainz ? false
|
||||||
|
, libmusicbrainz5
|
||||||
|
|
||||||
|
, withTaglib ? true
|
||||||
|
, taglib
|
||||||
|
, taglib_extras
|
||||||
|
, withHttpStream ? true
|
||||||
|
, qtmultimedia
|
||||||
|
, gst_all_1
|
||||||
|
, withReplaygain ? true
|
||||||
|
, ffmpeg
|
||||||
|
, speex
|
||||||
|
, mpg123
|
||||||
|
, withMtp ? true
|
||||||
|
, libmtp
|
||||||
|
, withOnlineServices ? true
|
||||||
|
, withDevices ? true
|
||||||
|
, udisks2
|
||||||
|
, withDynamic ? true
|
||||||
|
, withHttpServer ? true
|
||||||
|
, withLibVlc ? false #true
|
||||||
|
, libvlc
|
||||||
|
, withStreams ? true
|
||||||
|
}:
|
||||||
|
|
||||||
|
# Inter-dependencies.
|
||||||
|
assert withCddb -> withCdda && withTaglib;
|
||||||
|
assert withCdda -> withCddb && withMusicbrainz;
|
||||||
|
assert withLame -> withCdda && withTaglib;
|
||||||
|
assert withMtp -> withTaglib;
|
||||||
|
assert withMusicbrainz -> withCdda && withTaglib;
|
||||||
|
assert withOnlineServices -> withTaglib;
|
||||||
|
assert withReplaygain -> withTaglib;
|
||||||
|
assert withLibVlc -> withHttpStream;
|
||||||
|
|
||||||
|
let
|
||||||
|
fstat = x: fn:
|
||||||
|
"-DENABLE_${fn}=${if x then "ON" else "OFF"}";
|
||||||
|
|
||||||
|
withUdisks = (withTaglib && withDevices);
|
||||||
|
|
||||||
|
gst = with gst_all_1; [ gstreamer gst-libav gst-plugins-base gst-plugins-good gst-plugins-bad ];
|
||||||
|
|
||||||
|
options = [
|
||||||
|
{ names = [ "CDDB" ]; enable = withCddb; pkgs = [ libcddb ]; }
|
||||||
|
{ names = [ "CDPARANOIA" ]; enable = withCdda; pkgs = [ cdparanoia ]; }
|
||||||
|
{ names = [ "DEVICES_SUPPORT" ]; enable = withDevices; pkgs = [ ]; }
|
||||||
|
{ names = [ "DYNAMIC" ]; enable = withDynamic; pkgs = [ ]; }
|
||||||
|
{ names = [ "FFMPEG" "MPG123" "SPEEXDSP" ]; enable = withReplaygain; pkgs = [ ffmpeg speex mpg123 ]; }
|
||||||
|
{ names = [ "HTTPS_SUPPORT" ]; enable = true; pkgs = [ ]; }
|
||||||
|
{ names = [ "HTTP_SERVER" ]; enable = withHttpServer; pkgs = [ ]; }
|
||||||
|
{ names = [ "HTTP_STREAM_PLAYBACK" ]; enable = withHttpStream; pkgs = [ qtmultimedia ]; }
|
||||||
|
{ names = [ "LAME" ]; enable = withLame; pkgs = [ lame ]; }
|
||||||
|
{ names = [ "LIBVLC" ]; enable = withLibVlc; pkgs = [ libvlc ]; }
|
||||||
|
{ names = [ "MTP" ]; enable = withMtp; pkgs = [ libmtp ]; }
|
||||||
|
{ names = [ "MUSICBRAINZ" ]; enable = withMusicbrainz; pkgs = [ libmusicbrainz5 ]; }
|
||||||
|
{ names = [ "ONLINE_SERVICES" ]; enable = withOnlineServices; pkgs = [ ]; }
|
||||||
|
{ names = [ "STREAMS" ]; enable = withStreams; pkgs = [ ]; }
|
||||||
|
{ names = [ "TAGLIB" "TAGLIB_EXTRAS" ]; enable = withTaglib; pkgs = [ taglib taglib_extras ]; }
|
||||||
|
{ names = [ "UDISKS2" ]; enable = withUdisks; pkgs = [ udisks2 ]; }
|
||||||
|
];
|
||||||
|
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "cantata";
|
||||||
|
version = "3.2.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "nullobsi";
|
||||||
|
repo = "cantata";
|
||||||
|
rev = "1ced66aaf82dad2137c01e887a88c10a4269467e";
|
||||||
|
sha256 = "NLHkX9kZeb0ED48I6qOajj2/e9rsGbtLX9+BSzG00tI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Cantata wants to check if perl is in the PATH at runtime, but we
|
||||||
|
# patchShebangs the playlists scripts, making that unnecessary (perl will
|
||||||
|
# always be available because it's a dependency)
|
||||||
|
./dont-check-for-perl-in-PATH.diff
|
||||||
|
./cantata-projectid.diff
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs playlists
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
qtbase
|
||||||
|
qtsvg
|
||||||
|
qtwayland
|
||||||
|
(perl.withPackages (ppkgs: with ppkgs; [ URI ]))
|
||||||
|
]
|
||||||
|
++ lib.flatten (builtins.catAttrs "pkgs" (builtins.filter (e: e.enable) options));
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake pkg-config qttools 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 = with lib; {
|
||||||
|
description = "Graphical client for MPD";
|
||||||
|
mainProgram = "cantata";
|
||||||
|
homepage = "https://github.com/cdrummond/cantata";
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
maintainers = with maintainers; [ peterhoeg ];
|
||||||
|
# Technically, Cantata runs on Darwin/Windows so if someone wants to
|
||||||
|
# bother figuring that one out, be my guest.
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
diff --git a/playlists/dynamicplaylists.cpp b/playlists/dynamicplaylists.cpp
|
||||||
|
index b85e93b5..3c29f775 100644
|
||||||
|
--- a/playlists/dynamicplaylists.cpp
|
||||||
|
+++ b/playlists/dynamicplaylists.cpp
|
||||||
|
@@ -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;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
QString fName(Utils::dataDir(rulesDir, false) + name + constExtension);
|
||||||
|
|
||||||
|
if (!QFile::exists(fName)) {
|
|
@ -1,10 +1,11 @@
|
||||||
{ inputs, ... }: {
|
{ inputs, pkgs, ... }: {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
inputs.nur.overlay
|
inputs.nur.overlay
|
||||||
|
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
kwrite = final.kdePackages.callPackage ./kwrite.nix {};
|
kwrite = final.kdePackages.callPackage ./kwrite.nix {};
|
||||||
mcontrolcenter = final.callPackage ./mcontrolcenter.nix {};
|
mcontrolcenter = final.callPackage ./mcontrolcenter.nix {};
|
||||||
|
cantata = final.qt6Packages.callPackage ./cantata {};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue