2016-11-18 13:29:32 +01:00
|
|
|
{ stdenv, fetchurl, python2Packages, intltool
|
2017-02-26 20:30:00 +01:00
|
|
|
, gst-python, withGstPlugins ? false, gst_plugins_base ? null
|
2017-02-26 20:36:54 +01:00
|
|
|
, gst-plugins-good ? null, gst_plugins_ugly ? null, gst-plugins-bad ? null }:
|
2013-04-18 01:44:12 +02:00
|
|
|
|
2013-10-29 11:33:46 +01:00
|
|
|
assert withGstPlugins -> gst_plugins_base != null
|
2017-02-26 20:36:20 +01:00
|
|
|
|| gst-plugins-good != null
|
2013-10-29 11:33:46 +01:00
|
|
|
|| gst_plugins_ugly != null
|
2017-02-26 20:36:54 +01:00
|
|
|
|| gst-plugins-bad != null;
|
2013-10-29 11:33:46 +01:00
|
|
|
|
2016-08-16 22:51:21 +02:00
|
|
|
let
|
|
|
|
version = "2.6.3";
|
2016-11-18 13:29:32 +01:00
|
|
|
inherit (python2Packages) buildPythonApplication python mutagen pygtk pygobject2 dbus-python;
|
2016-08-16 22:51:21 +02:00
|
|
|
in buildPythonApplication {
|
2013-04-18 01:44:12 +02:00
|
|
|
# call the package quodlibet and just quodlibet
|
2017-01-24 13:26:03 +01:00
|
|
|
name = "quodlibet${stdenv.lib.optionalString (!withGstPlugins) "-without-gst-plugins"}-${version}";
|
2013-04-18 01:44:12 +02:00
|
|
|
|
|
|
|
# XXX, tests fail
|
|
|
|
doCheck = false;
|
|
|
|
|
2014-03-10 14:51:05 +01:00
|
|
|
srcs = [
|
2013-04-18 01:44:12 +02:00
|
|
|
(fetchurl {
|
2013-10-29 11:33:46 +01:00
|
|
|
url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-${version}.tar.gz";
|
|
|
|
sha256 = "0ilasi4b0ay8r6v6ba209wsm80fq2nmzigzc5kvphrk71jwypx6z";
|
2013-04-18 01:44:12 +02:00
|
|
|
})
|
|
|
|
(fetchurl {
|
2013-10-29 11:33:46 +01:00
|
|
|
url = "https://bitbucket.org/lazka/quodlibet-files/raw/default/releases/quodlibet-plugins-${version}.tar.gz";
|
|
|
|
sha256 = "1rv08rhdjad8sjhplqsspcf4vkazgkxyshsqmbfbrrk5kvv57ybc";
|
2013-04-18 01:44:12 +02:00
|
|
|
})
|
2014-03-10 14:51:05 +01:00
|
|
|
];
|
2013-04-18 01:44:12 +02:00
|
|
|
|
2014-02-21 14:29:32 +01:00
|
|
|
preConfigure = ''
|
|
|
|
# TODO: for now don't a apply gdist overrides, will be needed for shipping icons, gtk, etc
|
|
|
|
sed -i /distclass/d setup.py
|
|
|
|
'';
|
|
|
|
|
2013-04-18 01:44:12 +02:00
|
|
|
sourceRoot = "quodlibet-${version}";
|
2014-03-10 14:51:05 +01:00
|
|
|
|
2013-04-18 01:44:12 +02:00
|
|
|
postUnpack = ''
|
|
|
|
# the patch searches for plugins in directory ../plugins
|
|
|
|
# so link the appropriate directory there
|
|
|
|
ln -sf quodlibet-plugins-${version} plugins
|
|
|
|
'';
|
2014-03-10 14:51:05 +01:00
|
|
|
|
2013-04-18 01:44:12 +02:00
|
|
|
patches = [ ./quodlibet-package-plugins.patch ];
|
|
|
|
|
2013-10-29 11:33:46 +01:00
|
|
|
buildInputs = stdenv.lib.optionals withGstPlugins [
|
2017-02-26 20:36:54 +01:00
|
|
|
gst_plugins_base gst-plugins-good gst_plugins_ugly gst-plugins-bad
|
2013-04-18 01:44:12 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2017-02-26 20:30:00 +01:00
|
|
|
mutagen pygtk pygobject2 dbus-python gst-python intltool
|
2013-04-18 01:44:12 +02:00
|
|
|
];
|
|
|
|
|
2013-10-29 11:33:46 +01:00
|
|
|
postInstall = stdenv.lib.optionalString withGstPlugins ''
|
2013-04-18 01:44:12 +02:00
|
|
|
# Wrap quodlibet so it finds the GStreamer plug-ins
|
2014-02-28 02:03:07 +01:00
|
|
|
wrapProgram "$out/bin/quodlibet" --prefix \
|
|
|
|
GST_PLUGIN_SYSTEM_PATH ":" "$GST_PLUGIN_SYSTEM_PATH" \
|
2013-04-18 01:44:12 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "GTK+-based audio player written in Python, using the Mutagen tagging library";
|
2013-04-18 01:44:12 +02:00
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Quod Libet is a GTK+-based audio player written in Python, using
|
|
|
|
the Mutagen tagging library. It's designed around the idea that
|
|
|
|
you know how to organize your music better than we do. It lets
|
|
|
|
you make playlists based on regular expressions (don't worry,
|
|
|
|
regular searches work too). It lets you display and edit any
|
|
|
|
tags you want in the file. And it lets you do this for all the
|
|
|
|
file formats it supports. Quod Libet easily scales to libraries
|
|
|
|
of thousands (or even tens of thousands) of songs. It also
|
|
|
|
supports most of the features you expect from a modern media
|
|
|
|
player, like Unicode support, tag editing, Replay Gain, podcasts
|
|
|
|
& internet radio, and all major audio formats.
|
|
|
|
'';
|
|
|
|
|
2014-04-23 14:26:16 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.coroa ];
|
2013-04-18 01:44:12 +02:00
|
|
|
homepage = http://code.google.com/p/quodlibet/;
|
|
|
|
};
|
|
|
|
}
|