2016-08-14 12:52:23 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig
|
2017-05-26 14:43:25 +01:00
|
|
|
, pythonPackages, pyrex096, ffmpeg, boost, glib, gtk2, webkitgtk24x-gtk2, libsoup
|
2016-08-14 12:52:23 +01:00
|
|
|
, taglib, sqlite
|
2014-04-01 04:11:46 +01:00
|
|
|
, libtorrentRasterbar, glib_networking, gsettings_desktop_schemas
|
2017-02-26 20:25:29 +00:00
|
|
|
, gst-python, gst-plugins-base, gst-plugins-good, gst-ffmpeg
|
2014-10-14 18:44:16 +01:00
|
|
|
, enableBonjour ? false, avahi ? null
|
2013-10-28 18:15:32 +00:00
|
|
|
}:
|
|
|
|
|
2014-10-14 18:44:16 +01:00
|
|
|
assert enableBonjour -> avahi != null;
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
2016-08-14 12:52:23 +01:00
|
|
|
let
|
|
|
|
inherit (pythonPackages) python buildPythonApplication;
|
2013-10-28 18:15:32 +00:00
|
|
|
version = "6.0";
|
2016-08-14 12:52:23 +01:00
|
|
|
in buildPythonApplication rec {
|
|
|
|
name = "miro-${version}";
|
2013-10-28 18:15:32 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://ftp.osuosl.org/pub/pculture.org/miro/src/${name}.tar.gz";
|
|
|
|
sha256 = "0sq25w365i1fz95398vxql3yjl5i6mq77mnmlhmn0pgyg111k3am";
|
|
|
|
};
|
|
|
|
|
|
|
|
setSourceRoot = ''
|
|
|
|
sourceRoot=${name}/linux
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [ ./gconf.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
2014-04-21 09:11:48 +01:00
|
|
|
patch -p1 -d .. < "${./youtube-feeds.patch}"
|
|
|
|
|
2013-10-28 18:15:32 +00:00
|
|
|
sed -i -e 's/\$(shell which python)/python/' Makefile
|
|
|
|
sed -i -e 's|/usr/bin/||' -e 's|/usr||' \
|
|
|
|
-e 's/BUILD_TIME[^,]*/BUILD_TIME=0/' setup.py
|
|
|
|
|
2015-10-11 15:34:23 +01:00
|
|
|
sed -i -e 's|default="/usr/bin/ffmpeg"|default="${ffmpeg.bin}/bin/ffmpeg"|' \
|
2013-10-28 18:15:32 +00:00
|
|
|
plat/options.py
|
|
|
|
|
|
|
|
sed -i -e 's|/usr/share/miro/themes|'"$out/share/miro/themes"'|' \
|
|
|
|
-e 's/gnome-open/xdg-open/g' \
|
|
|
|
-e '/RESOURCE_ROOT =.*(/,/)/ {
|
|
|
|
c RESOURCE_ROOT = '"'$out/share/miro/resources/'"'
|
|
|
|
}' \
|
|
|
|
plat/resources.py
|
2014-10-14 18:44:16 +01:00
|
|
|
'' + optionalString enableBonjour ''
|
|
|
|
sed -i -e 's|ctypes.cdll.LoadLibrary( *|ctypes.CDLL("${avahi}/lib/" +|' \
|
|
|
|
../lib/libdaap/pybonjour.py
|
2013-10-28 18:15:32 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Disabled for now, because it requires networking and even if we skip those
|
|
|
|
# tests, the whole test run takes around 10-20 minutes.
|
|
|
|
doCheck = false;
|
|
|
|
checkPhase = ''
|
|
|
|
HOME="$TEMPDIR" LANG=en_US.UTF-8 python miro.real --unittest
|
|
|
|
'';
|
|
|
|
|
2014-01-06 22:35:39 +00:00
|
|
|
preInstall = ''
|
|
|
|
# see https://bitbucket.org/pypa/setuptools/issue/130/install_data-doesnt-respect-prefix
|
2016-08-14 12:52:23 +01:00
|
|
|
${python.interpreter} setup.py install_data --root=$out
|
2014-01-06 22:35:39 +00:00
|
|
|
sed -i '/data_files=data_files/d' setup.py
|
|
|
|
'';
|
|
|
|
|
2013-10-28 18:15:32 +00:00
|
|
|
postInstall = ''
|
2014-01-11 19:14:58 +00:00
|
|
|
mv "$out/bin/miro.real" "$out/bin/miro"
|
2014-04-01 04:11:46 +01:00
|
|
|
wrapProgram "$out/bin/miro" \
|
|
|
|
--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" \
|
2015-10-11 15:06:34 +01:00
|
|
|
--prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \
|
2014-04-22 09:32:54 +01:00
|
|
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
|
2013-10-28 18:15:32 +00:00
|
|
|
'';
|
|
|
|
|
2016-09-11 22:24:51 +01:00
|
|
|
buildInputs = with pythonPackages; [ pygtk pygobject2 ] ++ [
|
2017-05-26 14:43:25 +01:00
|
|
|
pkgconfig pyrex096 ffmpeg boost glib gtk2 webkitgtk24x-gtk2 libsoup
|
2016-08-14 12:52:23 +01:00
|
|
|
taglib gsettings_desktop_schemas sqlite
|
2013-10-28 18:15:32 +00:00
|
|
|
];
|
|
|
|
|
2016-08-14 12:52:23 +01:00
|
|
|
propagatedBuildInputs = with pythonPackages; [
|
2016-10-13 23:03:12 +01:00
|
|
|
pygobject2 pygtk pycurl mutagen pycairo dbus-python
|
2016-08-14 12:52:23 +01:00
|
|
|
pywebkitgtk] ++ [ libtorrentRasterbar
|
2017-02-26 20:25:29 +00:00
|
|
|
gst-python gst-plugins-base gst-plugins-good gst-ffmpeg
|
2014-10-14 18:44:16 +01:00
|
|
|
] ++ optional enableBonjour avahi;
|
2013-10-28 18:15:32 +00:00
|
|
|
|
|
|
|
meta = {
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://www.getmiro.com/;
|
2013-10-28 18:15:32 +00:00
|
|
|
description = "Video and audio feed aggregator";
|
2014-10-14 18:44:16 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = [ maintainers.aszlig ];
|
|
|
|
platforms = platforms.linux;
|
2013-10-28 18:15:32 +00:00
|
|
|
};
|
|
|
|
}
|