From 23f4ac9150e0810de4ace1d82bcd27cd3d13c635 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Mon, 30 Mar 2020 10:10:23 -0700 Subject: cantata: make qtmultimedia and vlc optional Upstream defaults vlc to off. Its only purpose is as an alternative to QtMultimedia for "MPD HTTP stream playback" [1]. Similarly, provide a toggle for qtmultimedia, in case somebody wants to disable HTTP stream playback. [1] https://github.com/CDrummond/cantata/blob/efa907c8e03d052718f14834eb968da86d1c34d8/CMakeLists.txt#L51 --- pkgs/applications/audio/cantata/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'pkgs/applications/audio/cantata') diff --git a/pkgs/applications/audio/cantata/default.nix b/pkgs/applications/audio/cantata/default.nix index cd1783ff685..799cefc7819 100644 --- a/pkgs/applications/audio/cantata/default.nix +++ b/pkgs/applications/audio/cantata/default.nix @@ -1,5 +1,5 @@ -{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig, vlc -, qtbase, qtmultimedia, qtsvg, qttools +{ mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig +, qtbase, qtsvg, qttools # Cantata doesn't build with cdparanoia enabled so we disable that # default for now until I (or someone else) figure it out. @@ -9,12 +9,14 @@ , withMusicbrainz ? false, libmusicbrainz5 , withTaglib ? true, taglib, taglib_extras +, withHttpStream ? true, qtmultimedia , withReplaygain ? true, ffmpeg, speex, mpg123 , withMtp ? true, libmtp , withOnlineServices ? true , withDevices ? true, udisks2 , withDynamic ? true , withHttpServer ? true +, withLibVlc ? false, vlc , withStreams ? true }: @@ -26,6 +28,7 @@ assert withMtp -> withTaglib; assert withMusicbrainz -> withCdda && withTaglib; assert withOnlineServices -> withTaglib; assert withReplaygain -> withTaglib; +assert withLibVlc -> withHttpStream; let version = "2.4.1"; @@ -45,15 +48,17 @@ in mkDerivation { sha256 = "0ix7xp352bziwz31mw79y7wxxmdn6060p8ry2px243ni1lz1qx1c"; }; - buildInputs = [ vlc qtbase qtmultimedia qtsvg ] + buildInputs = [ qtbase qtsvg ] ++ lib.optionals withTaglib [ taglib taglib_extras ] ++ lib.optionals withReplaygain [ ffmpeg speex mpg123 ] + ++ lib.optional withHttpStream qtmultimedia ++ lib.optional withCdda cdparanoia ++ lib.optional withCddb libcddb ++ lib.optional withLame lame ++ lib.optional withMtp libmtp ++ lib.optional withMusicbrainz libmusicbrainz5 - ++ lib.optional withUdisks udisks2; + ++ lib.optional withUdisks udisks2 + ++ lib.optional withLibVlc vlc; nativeBuildInputs = [ cmake pkgconfig qttools ]; @@ -62,6 +67,7 @@ in mkDerivation { cmakeFlags = lib.flatten [ (fstats withTaglib [ "TAGLIB" "TAGLIB_EXTRAS" ]) (fstats withReplaygain [ "FFMPEG" "MPG123" "SPEEXDSP" ]) + (fstat withHttpStream "HTTP_STREAM_PLAYBACK") (fstat withCdda "CDPARANOIA") (fstat withCddb "CDDB") (fstat withLame "LAME") @@ -71,6 +77,7 @@ in mkDerivation { (fstat withDynamic "DYNAMIC") (fstat withDevices "DEVICES_SUPPORT") (fstat withHttpServer "HTTP_SERVER") + (fstat withLibVlc "LIBVLC") (fstat withStreams "STREAMS") (fstat withUdisks "UDISKS2") "-DENABLE_HTTPS_SUPPORT=ON" -- cgit 1.4.1