···11+{ stdenv, fetchurl, python, buildPythonPackage, mutagen, pygtk, pygobject
22+, pythonDBus, gst_python, gst_plugins_base, gst_plugins_good, gst_plugins_ugly }:
33+44+let version = "2.5"; in
55+66+buildPythonPackage {
77+ # call the package quodlibet and just quodlibet
88+ name = "quodlibet-${version}";
99+ namePrefix = "";
1010+1111+ # XXX, tests fail
1212+ doCheck = false;
1313+1414+ src = [
1515+ (fetchurl {
1616+ url = "https://quodlibet.googlecode.com/files/quodlibet-${version}.tar.gz";
1717+ sha256 = "0qrmlz7m1jpmriy8bgycjiwzbf3annznkn4x5k32yy9bylxa7lwb";
1818+ })
1919+ (fetchurl {
2020+ url = "https://quodlibet.googlecode.com/files/quodlibet-plugins-${version}.tar.gz";
2121+ sha256 = "0kf2mkq2zk38626bn48gscvy6ir04f5b2z57ahlxlqy8imv2cjff";
2222+ })
2323+ ];
2424+2525+ sourceRoot = "quodlibet-${version}";
2626+ postUnpack = ''
2727+ # the patch searches for plugins in directory ../plugins
2828+ # so link the appropriate directory there
2929+ ln -sf quodlibet-plugins-${version} plugins
3030+ '';
3131+ patches = [ ./quodlibet-package-plugins.patch ];
3232+3333+ buildInputs = [
3434+ gst_plugins_base gst_plugins_good gst_plugins_ugly
3535+ ];
3636+3737+ propagatedBuildInputs = [
3838+ mutagen pygtk pygobject pythonDBus gst_python
3939+ ];
4040+4141+ postInstall = ''
4242+ # Wrap quodlibet so it finds the GStreamer plug-ins
4343+ wrapProgram "$out/bin/quodlibet" --prefix \
4444+ GST_PLUGIN_PATH ":" \
4545+ "${gst_plugins_base}/lib/gstreamer-0.10:${gst_plugins_good}/lib/gstreamer-0.10:${gst_plugins_ugly}/lib/gstreamer-0.10"
4646+ '';
4747+4848+ meta = {
4949+ description = "Quod Libet is a GTK+-based audio player written in Python, using the Mutagen tagging library.";
5050+5151+ longDescription = ''
5252+ Quod Libet is a GTK+-based audio player written in Python, using
5353+ the Mutagen tagging library. It's designed around the idea that
5454+ you know how to organize your music better than we do. It lets
5555+ you make playlists based on regular expressions (don't worry,
5656+ regular searches work too). It lets you display and edit any
5757+ tags you want in the file. And it lets you do this for all the
5858+ file formats it supports. Quod Libet easily scales to libraries
5959+ of thousands (or even tens of thousands) of songs. It also
6060+ supports most of the features you expect from a modern media
6161+ player, like Unicode support, tag editing, Replay Gain, podcasts
6262+ & internet radio, and all major audio formats.
6363+ '';
6464+6565+ homepage = http://code.google.com/p/quodlibet/;
6666+ };
6767+}