about summary refs log tree commit diff
path: root/pkgs/applications/audio/cantata
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2017-10-05 23:21:44 +0800
committerPeter Hoeg <peter@hoeg.com>2017-10-05 23:27:54 +0800
commita05f1e2ec4ee979aec0d696ff973bdcaef16b8ae (patch)
tree471caef17f0f198cda00c9a41071d52d9e3c3b78 /pkgs/applications/audio/cantata
parent14594db4810306996e143fd3cb28df8a641cea0f (diff)
cantata clean up
Diffstat (limited to 'pkgs/applications/audio/cantata')
-rw-r--r--pkgs/applications/audio/cantata/default.nix38
1 files changed, 17 insertions, 21 deletions
diff --git a/pkgs/applications/audio/cantata/default.nix b/pkgs/applications/audio/cantata/default.nix
index bd87d37041ae5..35fe510cbb2b5 100644
--- a/pkgs/applications/audio/cantata/default.nix
+++ b/pkgs/applications/audio/cantata/default.nix
@@ -38,9 +38,10 @@ let
   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 {
@@ -60,35 +61,30 @@ 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;
     description = "A graphical client for MPD";