From c1f55dcd35188b53a8a81bf7a243df12753802f3 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 14 Oct 2014 19:44:16 +0200 Subject: [PATCH] miro: Add support for video/audio library sharing. This is done using the Avahi/Bonjour compatibility library. Signed-off-by: aszlig --- pkgs/applications/video/miro/default.nix | 16 ++++++++++++---- pkgs/top-level/all-packages.nix | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/video/miro/default.nix b/pkgs/applications/video/miro/default.nix index 7572bedc1e0..cd203391749 100644 --- a/pkgs/applications/video/miro/default.nix +++ b/pkgs/applications/video/miro/default.nix @@ -3,8 +3,13 @@ , taglib, pysqlite, pycurl, mutagen, pycairo, pythonDBus, pywebkitgtk , libtorrentRasterbar, glib_networking, gsettings_desktop_schemas , gst_python, gst_plugins_base, gst_plugins_good, gst_ffmpeg +, enableBonjour ? false, avahi ? null }: +assert enableBonjour -> avahi != null; + +with stdenv.lib; + buildPythonPackage rec { name = "miro-${version}"; namePrefix = ""; @@ -37,6 +42,9 @@ buildPythonPackage rec { c RESOURCE_ROOT = '"'$out/share/miro/resources/'"' }' \ plat/resources.py + '' + optionalString enableBonjour '' + sed -i -e 's|ctypes.cdll.LoadLibrary( *|ctypes.CDLL("${avahi}/lib/" +|' \ + ../lib/libdaap/pybonjour.py ''; # Disabled for now, because it requires networking and even if we skip those @@ -69,13 +77,13 @@ buildPythonPackage rec { pygobject pygtk pycurl python.modules.sqlite3 mutagen pycairo pythonDBus pywebkitgtk libtorrentRasterbar gst_python gst_plugins_base gst_plugins_good gst_ffmpeg - ]; + ] ++ optional enableBonjour avahi; meta = { homepage = "http://www.getmiro.com/"; description = "Video and audio feed aggregator"; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = [ stdenv.lib.maintainers.aszlig ]; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2Plus; + maintainers = [ maintainers.aszlig ]; + platforms = platforms.linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 677fb81b794..fdaf3fbc118 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6134,6 +6134,9 @@ let miro = callPackage ../applications/video/miro { inherit (pythonPackages) pywebkitgtk pysqlite pycurl mutagen; + avahi = avahi.override { + withLibdnssdCompat = true; + }; }; mkvtoolnix = callPackage ../applications/video/mkvtoolnix { };