about summary refs log tree commit diff
diff options
context:
space:
mode:
authoradisbladis <adisbladis@gmail.com>2019-06-12 15:20:09 +0100
committeradisbladis <adisbladis@gmail.com>2019-06-12 15:20:41 +0100
commitacbfb0035207da71ed0f8952c56ee32a694edf5b (patch)
tree829d3f8c3f8d84cd44ec1e95c931698a3aadbbbd
parente37d6efadcf1adc3f579cabe728d16a7a73d7fe3 (diff)
pulseaudio-dlna: Fix build by downgrading zeroconf
-rw-r--r--pkgs/applications/audio/pulseaudio-dlna/default.nix12
-rw-r--r--pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix31
2 files changed, 39 insertions, 4 deletions
diff --git a/pkgs/applications/audio/pulseaudio-dlna/default.nix b/pkgs/applications/audio/pulseaudio-dlna/default.nix
index 72af8aff106bd..d414cb756114e 100644
--- a/pkgs/applications/audio/pulseaudio-dlna/default.nix
+++ b/pkgs/applications/audio/pulseaudio-dlna/default.nix
@@ -4,7 +4,7 @@
 , faacSupport ? false, faac ? null
 , flacSupport ? true, flac ? null
 , soxSupport ? true, sox ? null
-, vorbisSupport ? true, vorbisTools ? null 
+, vorbisSupport ? true, vorbisTools ? null
 }:
 
 assert mp3Support -> lame != null;
@@ -14,7 +14,10 @@ assert flacSupport -> flac != null;
 assert soxSupport -> sox != null;
 assert vorbisSupport -> vorbisTools != null;
 
-pythonPackages.buildPythonApplication rec {
+let
+  zeroconf = pythonPackages.callPackage ./zeroconf.nix { };
+
+in pythonPackages.buildPythonApplication rec {
   pname = "pulseaudio-dlna";
   version = "2017-11-01";
 
@@ -24,13 +27,14 @@ pythonPackages.buildPythonApplication rec {
     rev = "4472928dd23f274193f14289f59daec411023ab0";
     sha256 = "1dfn7036vrq49kxv4an7rayypnm5dlawsf02pfsldw877hzdamqk";
   };
-  
+
   # pulseaudio-dlna has no tests
   doCheck = false;
 
   propagatedBuildInputs = with pythonPackages; [
     dbus-python docopt requests setproctitle protobuf psutil futures
-    chardet notify2 netifaces pyroute2 pygobject2 lxml zeroconf ]
+    chardet notify2 netifaces pyroute2 pygobject2 lxml ]
+    ++ [ zeroconf ]
     ++ stdenv.lib.optional mp3Support lame
     ++ stdenv.lib.optional opusSupport opusTools
     ++ stdenv.lib.optional faacSupport faac
diff --git a/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix b/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix
new file mode 100644
index 0000000000000..9532c467d2bbc
--- /dev/null
+++ b/pkgs/applications/audio/pulseaudio-dlna/zeroconf.nix
@@ -0,0 +1,31 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+, ifaddr
+, typing
+, isPy27
+, pythonOlder
+, netifaces
+, six
+, enum-compat
+}:
+
+buildPythonPackage rec {
+  pname = "zeroconf";
+  version = "0.19.1";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3";
+  };
+
+  propagatedBuildInputs = [ netifaces six enum-compat ifaddr ]
+    ++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ];
+
+  meta = with stdenv.lib; {
+    description = "A pure python implementation of multicast DNS service discovery";
+    homepage = https://github.com/jstasiak/python-zeroconf;
+    license = licenses.lgpl21;
+    maintainers = [ ];
+  };
+}