@@ -38,9 +38,10 @@ let
3838 pname = "cantata";
3939 fstat = x: fn: "-DENABLE_" + fn + "=" + (if x then "ON" else "OFF");
4040 fstats = x: map (fstat x);
41−in
4241
43−stdenv.mkDerivation rec {
42+ withUdisks = (withTaglib && withDevices);
43+
44+in stdenv.mkDerivation rec {
4445 name = "${pname}-${version}";
4546
4647 src = fetchFromGitHub {
@@ -60,35 +61,30 @@ stdenv.mkDerivation rec {
6061 ++ stdenv.lib.optional withLame lame
6162 ++ stdenv.lib.optional withMtp libmtp
6263 ++ stdenv.lib.optional withMusicbrainz libmusicbrainz5
63− ++ stdenv.lib.optional (withTaglib && withDevices) udisks2;
64+ ++ stdenv.lib.optional withUdisks udisks2;
6465
6566 nativeBuildInputs = [ cmake pkgconfig ];
6667
6768 enableParallelBuilding = true;
6869
6970 cmakeFlags = stdenv.lib.flatten [
70− (fstat withQt5 "QT5")
71− (fstats withTaglib [ "TAGLIB" "TAGLIB_EXTRAS" ])
72− (fstats withReplaygain [ "FFMPEG" "MPG123" "SPEEXDSP" ])
73− (fstat withCdda "CDPARANOIA")
74− (fstat withCddb "CDDB")
75− (fstat withLame "LAME")
76− (fstat withMtp "MTP")
77− (fstat withMusicbrainz "MUSICBRAINZ")
71+ (fstat withQt5 "QT5")
72+ (fstats withTaglib [ "TAGLIB" "TAGLIB_EXTRAS" ])
73+ (fstats withReplaygain [ "FFMPEG" "MPG123" "SPEEXDSP" ])
74+ (fstat withCdda "CDPARANOIA")
75+ (fstat withCddb "CDDB")
76+ (fstat withLame "LAME")
77+ (fstat withMtp "MTP")
78+ (fstat withMusicbrainz "MUSICBRAINZ")
7879 (fstat withOnlineServices "ONLINE_SERVICES")
79− (fstat withDynamic "DYNAMIC")
80− (fstat withDevices "DEVICES_SUPPORT")
81− (fstat withHttpServer "HTTP_SERVER")
82− (fstat withStreams "STREAMS")
80+ (fstat withDynamic "DYNAMIC")
81+ (fstat withDevices "DEVICES_SUPPORT")
82+ (fstat withHttpServer "HTTP_SERVER")
83+ (fstat withStreams "STREAMS")
84+ (fstat withUdisks "UDISKS2")
8385 "-DENABLE_HTTPS_SUPPORT=ON"
84− "-DENABLE_UDISKS2=ON"
8586 ];
8687
87− # This is already fixed upstream but not released yet. Maybe in version 2.
88− preConfigure = ''
89− # sed -i -e 's/STRLESS/VERSION_LESS/g' cmake/FindTaglib.cmake
90− '';
91−
9288 meta = with stdenv.lib; {
9389 homepage = https://github.com/cdrummond/cantata;
9490 description = "A graphical client for MPD";