2018-02-21 09:16:47 +00:00
|
|
|
{ fetchFromGitHub, stdenv, pythonPackages
|
|
|
|
, mp3Support ? true, lame ? null
|
|
|
|
, opusSupport ? true, opusTools ? null
|
|
|
|
, faacSupport ? false, faac ? null
|
|
|
|
, flacSupport ? true, flac ? null
|
|
|
|
, soxSupport ? true, sox ? null
|
2020-08-29 16:37:11 +01:00
|
|
|
, vorbisSupport ? true, vorbis-tools ? null
|
2018-02-21 09:16:47 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert mp3Support -> lame != null;
|
|
|
|
assert opusSupport -> opusTools != null;
|
|
|
|
assert faacSupport -> faac != null;
|
|
|
|
assert flacSupport -> flac != null;
|
|
|
|
assert soxSupport -> sox != null;
|
2020-08-29 16:37:11 +01:00
|
|
|
assert vorbisSupport -> vorbis-tools != null;
|
2018-02-21 09:16:47 +00:00
|
|
|
|
2019-06-12 15:20:09 +01:00
|
|
|
let
|
|
|
|
zeroconf = pythonPackages.callPackage ./zeroconf.nix { };
|
2020-02-21 06:10:42 +00:00
|
|
|
in
|
|
|
|
pythonPackages.buildPythonApplication {
|
2018-02-21 09:16:47 +00:00
|
|
|
pname = "pulseaudio-dlna";
|
2020-02-21 06:10:42 +00:00
|
|
|
version = "unstable-2017-11-01";
|
2018-02-21 09:16:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "masmu";
|
|
|
|
repo = "pulseaudio-dlna";
|
|
|
|
rev = "4472928dd23f274193f14289f59daec411023ab0";
|
|
|
|
sha256 = "1dfn7036vrq49kxv4an7rayypnm5dlawsf02pfsldw877hzdamqk";
|
|
|
|
};
|
2019-06-12 15:20:09 +01:00
|
|
|
|
2018-02-21 09:16:47 +00:00
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
|
|
|
dbus-python docopt requests setproctitle protobuf psutil futures
|
2020-02-21 06:10:42 +00:00
|
|
|
chardet notify2 netifaces pyroute2 pygobject2 lxml setuptools ]
|
2019-06-12 15:20:09 +01:00
|
|
|
++ [ zeroconf ]
|
2018-02-21 09:16:47 +00:00
|
|
|
++ stdenv.lib.optional mp3Support lame
|
|
|
|
++ stdenv.lib.optional opusSupport opusTools
|
|
|
|
++ stdenv.lib.optional faacSupport faac
|
|
|
|
++ stdenv.lib.optional flacSupport flac
|
|
|
|
++ stdenv.lib.optional soxSupport sox
|
2020-08-29 16:37:11 +01:00
|
|
|
++ stdenv.lib.optional vorbisSupport vorbis-tools;
|
2018-02-21 09:16:47 +00:00
|
|
|
|
2020-02-21 06:10:42 +00:00
|
|
|
# upstream has no tests
|
|
|
|
checkPhase = ''
|
|
|
|
$out/bin/pulseaudio-dlna --help > /dev/null
|
|
|
|
'';
|
|
|
|
|
2018-02-21 09:16:47 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A lightweight streaming server which brings DLNA / UPNP and Chromecast support to PulseAudio and Linux";
|
2020-02-21 06:10:42 +00:00
|
|
|
homepage = "https://github.com/masmu/pulseaudio-dlna";
|
2018-02-21 09:16:47 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|