summary refs log tree commit diff
path: root/pkgs/applications/audio/cantata/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio/cantata/default.nix')
-rw-r--r--pkgs/applications/audio/cantata/default.nix51
1 files changed, 23 insertions, 28 deletions
diff --git a/pkgs/applications/audio/cantata/default.nix b/pkgs/applications/audio/cantata/default.nix
index f09791d9aa1f..35fe510cbb2b 100644
--- a/pkgs/applications/audio/cantata/default.nix
+++ b/pkgs/applications/audio/cantata/default.nix
@@ -34,20 +34,21 @@ assert withOnlineServices -> withTaglib;
 assert withReplaygain -> withTaglib;
 
 let
-  version = "2.1.0";
+  version = "2.2.0";
   pname = "cantata";
   fstat = x: fn: "-DENABLE_" + fn + "=" + (if x then "ON" else "OFF");
   fstats = x: map (fstat x);
-in
 
-stdenv.mkDerivation rec {
+  withUdisks = (withTaglib && withDevices);
+
+in stdenv.mkDerivation rec {
   name = "${pname}-${version}";
 
   src = fetchFromGitHub {
     owner  = "CDrummond";
     repo   = "cantata";
     rev    = "v${version}";
-    sha256 = "1mwc3cyrvg8qxjn70h4i6kdkvz85xspb3wi8wrb56jrhil409fkh";
+    sha256 = "1b633chgfs8rya78bzzck5zijna15d1y4nmrz4dcjp862ks5y5q6";
   };
 
   buildInputs = [ vlc ]
@@ -60,43 +61,37 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optional  withLame lame
     ++ stdenv.lib.optional  withMtp libmtp
     ++ stdenv.lib.optional  withMusicbrainz libmusicbrainz5
-    ++ stdenv.lib.optional  (withTaglib && withDevices) udisks2;
+    ++ stdenv.lib.optional  withUdisks udisks2;
 
   nativeBuildInputs = [ cmake pkgconfig ];
 
   enableParallelBuilding = true;
 
   cmakeFlags = stdenv.lib.flatten [
-    (fstat withQt5 "QT5")
-    (fstats withTaglib [ "TAGLIB" "TAGLIB_EXTRAS" ])
-    (fstats withReplaygain [ "FFMPEG" "MPG123" "SPEEXDSP" ])
-    (fstat withCdda "CDPARANOIA")
-    (fstat withCddb "CDDB")
-    (fstat withLame "LAME")
-    (fstat withMtp "MTP")
-    (fstat withMusicbrainz "MUSICBRAINZ")
+    (fstat withQt5            "QT5")
+    (fstats withTaglib        [ "TAGLIB" "TAGLIB_EXTRAS" ])
+    (fstats withReplaygain    [ "FFMPEG" "MPG123" "SPEEXDSP" ])
+    (fstat withCdda           "CDPARANOIA")
+    (fstat withCddb           "CDDB")
+    (fstat withLame           "LAME")
+    (fstat withMtp            "MTP")
+    (fstat withMusicbrainz    "MUSICBRAINZ")
     (fstat withOnlineServices "ONLINE_SERVICES")
-    (fstat withDynamic "DYNAMIC")
-    (fstat withDevices "DEVICES_SUPPORT")
-    (fstat withHttpServer "HTTP_SERVER")
-    (fstat withStreams "STREAMS")
+    (fstat withDynamic        "DYNAMIC")
+    (fstat withDevices        "DEVICES_SUPPORT")
+    (fstat withHttpServer     "HTTP_SERVER")
+    (fstat withStreams        "STREAMS")
+    (fstat withUdisks         "UDISKS2")
     "-DENABLE_HTTPS_SUPPORT=ON"
-    "-DENABLE_UDISKS2=ON"
   ];
 
-  # This is already fixed upstream but not released yet. Maybe in version 2.
-  preConfigure = ''
-    sed -i -e 's/STRLESS/VERSION_LESS/g' cmake/FindTaglib.cmake
-  '';
-
   meta = with stdenv.lib; {
-    homepage = https://github.com/cdrummond/cantata;
+    homepage    = https://github.com/cdrummond/cantata;
     description = "A graphical client for MPD";
-    license = licenses.gpl3;
-
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ fuuzetsu peterhoeg ];
     # Technically Cantata can run on Windows so if someone wants to
     # bother figuring that one out, be my guest.
-    platforms = platforms.linux;
-    maintainers = with maintainers; [ fuuzetsu ];
+    platforms   = platforms.linux;
   };
 }