Skip to content

Commit

Permalink
cantata clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhoeg committed Oct 5, 2017
1 parent 14594db commit a05f1e2
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions pkgs/applications/audio/cantata/default.nix
Expand Up @@ -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 {
Expand All @@ -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";
Expand Down

0 comments on commit a05f1e2

Please sign in to comment.