2019-05-22 11:03:39 +00:00
|
|
|
{ stdenv, fetchurl, python3, wrapGAppsHook, gettext, libsoup, gnome3, gtk3, gdk-pixbuf,
|
2018-12-02 11:41:15 +00:00
|
|
|
tag ? "", xvfb_run, dbus, glibcLocales, glib, glib-networking, gobject-introspection,
|
2017-09-17 08:00:36 +00:00
|
|
|
gst_all_1, withGstPlugins ? true,
|
|
|
|
xineBackend ? false, xineLib,
|
|
|
|
withDbusPython ? false, withPyInotify ? false, withMusicBrainzNgs ? false, withPahoMqtt ? false,
|
|
|
|
webkitgtk ? null,
|
|
|
|
keybinder3 ? null, gtksourceview ? null, libmodplug ? null, kakasi ? null, libappindicator-gtk3 ? null }:
|
|
|
|
|
|
|
|
let optionals = stdenv.lib.optionals; in
|
2018-03-30 12:24:43 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2018-06-23 13:27:58 +00:00
|
|
|
pname = "quodlibet${tag}";
|
2019-01-02 12:51:10 +00:00
|
|
|
version = "4.2.1";
|
2013-04-17 23:44:12 +00:00
|
|
|
|
2017-09-17 08:00:36 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/quodlibet/quodlibet/releases/download/release-${version}/quodlibet-${version}.tar.gz";
|
2019-01-02 12:51:10 +00:00
|
|
|
sha256 = "0b1rvr4hqs2bjmhayms7vxxkn3d92k9v7p1269rjhf11hpk122l7";
|
2017-09-17 08:00:36 +00:00
|
|
|
};
|
2014-03-10 13:51:05 +00:00
|
|
|
|
2019-01-02 12:51:10 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook gettext ];
|
2013-04-17 23:44:12 +00:00
|
|
|
|
2020-01-16 00:06:59 +00:00
|
|
|
checkInputs = [ gdk-pixbuf ] ++ (with python3.pkgs; [ pytest pytest_xdist polib xvfb_run dbus.daemon glibcLocales ]);
|
2018-03-30 12:24:43 +00:00
|
|
|
|
2019-05-22 11:03:39 +00:00
|
|
|
buildInputs = [ gnome3.adwaita-icon-theme libsoup glib glib-networking gtk3 webkitgtk gdk-pixbuf keybinder3 gtksourceview libmodplug libappindicator-gtk3 kakasi gobject-introspection ]
|
2017-09-17 08:00:36 +00:00
|
|
|
++ (if xineBackend then [ xineLib ] else with gst_all_1;
|
|
|
|
[ gstreamer gst-plugins-base ] ++ optionals withGstPlugins [ gst-plugins-good gst-plugins-ugly gst-plugins-bad ]);
|
2013-04-17 23:44:12 +00:00
|
|
|
|
2018-03-30 12:24:43 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [ pygobject3 pycairo mutagen gst-python feedparser ]
|
2017-09-17 08:00:36 +00:00
|
|
|
++ optionals withDbusPython [ dbus-python ]
|
|
|
|
++ optionals withPyInotify [ pyinotify ]
|
|
|
|
++ optionals withMusicBrainzNgs [ musicbrainzngs ]
|
|
|
|
++ optionals stdenv.isDarwin [ pyobjc ]
|
|
|
|
++ optionals withPahoMqtt [ paho-mqtt ];
|
2013-04-17 23:44:12 +00:00
|
|
|
|
2018-03-30 12:24:43 +00:00
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
|
2020-01-18 17:35:11 +00:00
|
|
|
pytestFlags = stdenv.lib.optionals (xineBackend || !withGstPlugins) [
|
|
|
|
"--ignore=tests/plugin/test_replaygain.py"
|
|
|
|
] ++ [
|
|
|
|
# upstream does actually not enforce source code linting
|
|
|
|
"--ignore=tests/quality"
|
|
|
|
# build failure on Arch Linux
|
|
|
|
# https://github.com/NixOS/nixpkgs/pull/77796#issuecomment-575841355
|
|
|
|
"--ignore=tests/test_operon.py"
|
|
|
|
];
|
|
|
|
|
2018-03-30 12:24:43 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2020-01-16 00:06:59 +00:00
|
|
|
env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS" \
|
2019-01-02 12:51:10 +00:00
|
|
|
HOME=$(mktemp -d) \
|
2018-03-30 12:24:43 +00:00
|
|
|
xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
|
|
|
|
--config-file=${dbus.daemon}/share/dbus-1/session.conf \
|
2020-01-18 17:35:11 +00:00
|
|
|
py.test $pytestFlags
|
2018-03-30 12:24:43 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = stdenv.lib.optionalString (kakasi != null) "gappsWrapperArgs+=(--prefix PATH : ${kakasi}/bin)";
|
2013-04-17 23:44:12 +00:00
|
|
|
|
2018-03-30 12:24:43 +00:00
|
|
|
meta = with stdenv.lib; {
|
2019-09-03 22:49:40 +00:00
|
|
|
description = "GTK-based audio player written in Python, using the Mutagen tagging library";
|
2018-03-30 12:24:43 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2013-04-17 23:44:12 +00:00
|
|
|
|
|
|
|
longDescription = ''
|
2019-09-03 22:49:40 +00:00
|
|
|
Quod Libet is a GTK-based audio player written in Python, using
|
2013-04-17 23:44:12 +00:00
|
|
|
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.
|
|
|
|
'';
|
|
|
|
|
2018-03-30 12:24:43 +00:00
|
|
|
maintainers = with maintainers; [ coroa sauyon ];
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://quodlibet.readthedocs.io/en/latest/";
|
2013-04-17 23:44:12 +00:00
|
|
|
};
|
|
|
|
}
|