2022-08-05 11:10:32 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, tag ? ""
|
|
|
|
|
2023-08-23 10:07:39 +00:00
|
|
|
# build time
|
2022-08-05 11:10:32 +00:00
|
|
|
, gettext
|
|
|
|
, gobject-introspection
|
|
|
|
, wrapGAppsHook
|
|
|
|
|
2023-08-23 10:07:39 +00:00
|
|
|
# runtime
|
2022-08-05 11:10:32 +00:00
|
|
|
, adwaita-icon-theme
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
|
|
|
, glib-networking
|
|
|
|
, gtk3
|
|
|
|
, gtksourceview
|
|
|
|
, kakasi
|
|
|
|
, keybinder3
|
|
|
|
, libappindicator-gtk3
|
|
|
|
, libmodplug
|
|
|
|
, librsvg
|
|
|
|
, libsoup
|
|
|
|
, webkitgtk
|
|
|
|
|
2023-08-23 10:07:39 +00:00
|
|
|
# optional features
|
2022-08-05 11:10:32 +00:00
|
|
|
, withDbusPython ? false
|
|
|
|
, withMusicBrainzNgs ? false
|
|
|
|
, withPahoMqtt ? false
|
2023-08-23 10:07:39 +00:00
|
|
|
, withPyInotify ? false
|
|
|
|
, withPypresence ? false
|
2022-08-05 11:10:32 +00:00
|
|
|
, withSoco ? false
|
|
|
|
|
2023-08-23 10:07:39 +00:00
|
|
|
# backends
|
2022-08-05 11:10:32 +00:00
|
|
|
, withGstPlugins ? withGstreamerBackend
|
2023-08-23 10:07:39 +00:00
|
|
|
, withGstreamerBackend ? true
|
|
|
|
, gst_all_1
|
|
|
|
, withXineBackend ? true
|
|
|
|
, xine-lib
|
2022-08-05 11:10:32 +00:00
|
|
|
|
2023-08-23 10:07:39 +00:00
|
|
|
# tests
|
2022-08-05 11:10:32 +00:00
|
|
|
, dbus
|
|
|
|
, glibcLocales
|
|
|
|
, hicolor-icon-theme
|
|
|
|
, python3
|
|
|
|
, xvfb-run
|
|
|
|
}:
|
|
|
|
|
2018-03-30 12:24:43 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2018-06-23 13:27:58 +00:00
|
|
|
pname = "quodlibet${tag}";
|
2023-08-23 10:07:39 +00:00
|
|
|
version = "4.6.0";
|
2022-08-05 11:10:32 +00:00
|
|
|
format = "pyproject";
|
2013-04-17 23:44:12 +00:00
|
|
|
|
2023-08-23 10:07:39 +00:00
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
2022-08-05 11:10:32 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "quodlibet";
|
|
|
|
repo = "quodlibet";
|
|
|
|
rev = "refs/tags/release-${version}";
|
2023-08-23 10:51:24 +00:00
|
|
|
hash = "sha256-dkO/CFN7Dk72xhtmcSDcwUciOPMeEjQS2mch+jSfiII=";
|
2017-09-17 08:00:36 +00:00
|
|
|
};
|
2014-03-10 13:51:05 +00:00
|
|
|
|
2022-08-05 11:10:32 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
] ++ (with python3.pkgs; [
|
|
|
|
sphinx-rtd-theme
|
2023-08-23 10:07:39 +00:00
|
|
|
sphinxHook
|
2022-08-05 11:10:32 +00:00
|
|
|
]);
|
2018-03-30 12:24:43 +00:00
|
|
|
|
2022-08-05 11:10:32 +00:00
|
|
|
buildInputs = [
|
|
|
|
adwaita-icon-theme
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
|
|
|
glib-networking
|
|
|
|
gtk3
|
|
|
|
gtksourceview
|
|
|
|
kakasi
|
|
|
|
keybinder3
|
|
|
|
libappindicator-gtk3
|
|
|
|
libmodplug
|
|
|
|
libsoup
|
|
|
|
webkitgtk
|
|
|
|
] ++ lib.optionals (withXineBackend) [
|
|
|
|
xine-lib
|
|
|
|
] ++ lib.optionals (withGstreamerBackend) (with gst_all_1; [
|
|
|
|
gst-plugins-base
|
|
|
|
gstreamer
|
|
|
|
] ++ lib.optionals (withGstPlugins) [
|
2022-12-06 19:12:39 +00:00
|
|
|
gst-libav
|
2022-08-05 11:10:32 +00:00
|
|
|
gst-plugins-bad
|
|
|
|
gst-plugins-good
|
|
|
|
gst-plugins-ugly
|
|
|
|
]);
|
2013-04-17 23:44:12 +00:00
|
|
|
|
2022-08-05 11:10:32 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
feedparser
|
|
|
|
gst-python
|
|
|
|
mutagen
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
|
|
|
]
|
|
|
|
++ lib.optionals withDbusPython [ dbus-python ]
|
|
|
|
++ lib.optionals withMusicBrainzNgs [ musicbrainzngs ]
|
|
|
|
++ lib.optionals withPahoMqtt [ paho-mqtt ]
|
2023-08-23 10:07:39 +00:00
|
|
|
++ lib.optionals withPyInotify [ pyinotify ]
|
|
|
|
++ lib.optionals withPypresence [ pypresence ]
|
2022-08-05 11:10:32 +00:00
|
|
|
++ lib.optionals withSoco [ soco ];
|
2013-04-17 23:44:12 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-11-21 02:03:50 +00:00
|
|
|
dbus
|
2022-08-05 11:10:32 +00:00
|
|
|
gdk-pixbuf
|
|
|
|
glibcLocales
|
|
|
|
hicolor-icon-theme
|
|
|
|
xvfb-run
|
|
|
|
] ++ (with python3.pkgs; [
|
|
|
|
polib
|
|
|
|
pytest
|
|
|
|
pytest-xdist
|
|
|
|
]);
|
|
|
|
|
|
|
|
pytestFlags = [
|
|
|
|
# missing translation strings in potfiles
|
|
|
|
"--deselect=tests/test_po.py::TPOTFILESIN::test_missing"
|
2023-08-23 10:51:24 +00:00
|
|
|
# require networking
|
|
|
|
"--deselect=tests/plugin/test_covers.py::test_live_cover_download"
|
|
|
|
"--deselect=tests/test_browsers_iradio.py::TInternetRadio::test_click_add_station"
|
2020-01-18 17:35:11 +00:00
|
|
|
# upstream does actually not enforce source code linting
|
|
|
|
"--ignore=tests/quality"
|
2022-08-05 11:10:32 +00:00
|
|
|
] ++ lib.optionals (withXineBackend || !withGstPlugins) [
|
|
|
|
"--ignore=tests/plugin/test_replaygain.py"
|
2020-01-18 17:35:11 +00:00
|
|
|
];
|
|
|
|
|
2023-08-23 10:07:39 +00:00
|
|
|
env.LC_ALL = "en_US.UTF-8";
|
|
|
|
|
2022-08-05 11:10:32 +00:00
|
|
|
preCheck = ''
|
|
|
|
export GDK_PIXBUF_MODULE_FILE=${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
|
|
|
|
export HOME=$(mktemp -d)
|
2023-08-23 10:07:39 +00:00
|
|
|
export XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS"
|
2022-08-05 11:10:32 +00:00
|
|
|
'';
|
|
|
|
|
2018-03-30 12:24:43 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
2022-08-05 11:10:32 +00:00
|
|
|
|
|
|
|
xvfb-run -s '-screen 0 1920x1080x24' \
|
2022-11-21 02:03:50 +00:00
|
|
|
dbus-run-session --config-file=${dbus}/share/dbus-1/session.conf \
|
2022-08-05 11:10:32 +00:00
|
|
|
pytest $pytestFlags
|
|
|
|
|
2018-03-30 12:24:43 +00:00
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2022-08-05 11:10:32 +00:00
|
|
|
preFixup = lib.optionalString (kakasi != null) ''
|
|
|
|
gappsWrapperArgs+=(--prefix PATH : ${kakasi}/bin)
|
|
|
|
'';
|
2013-04-17 23:44:12 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-09-03 22:49:40 +00:00
|
|
|
description = "GTK-based audio player written in Python, using the Mutagen tagging library";
|
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.
|
|
|
|
'';
|
2023-08-23 10:07:39 +00:00
|
|
|
homepage = "https://quodlibet.readthedocs.io/en/latest";
|
|
|
|
license = licenses.gpl2Plus;
|
2023-08-23 10:51:24 +00:00
|
|
|
maintainers = with maintainers; [ coroa paveloom pbogdan ];
|
2013-04-17 23:44:12 +00:00
|
|
|
};
|
|
|
|
}
|