git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #101266 from pbogdan/quodlibet

quodlibet: 4.2.1 -> 4.3.0, fix tests

commite750a79e49bb24fcc5e3005936ca788a2bd48e87 authorOrivej Desh (NixOS) <40807862+orivej-nixos@users.noreply.github.com> dateMon 7 Dec 2020, 14:20 (6 years ago) parent8ca5f787dfe92a
2 files changed+30−6
pkgs/applications/audio/quodlibet/default.nix+18−6 pkgs/applications/audio/quodlibet/quodlibet-feedparser6.patch+12
pkgs/applications/audio/quodlibet/default.nix+18−6
@@ -1,5 +1,5 @@
1−{ stdenv, fetchurl, python3, wrapGAppsHook, gettext, libsoup, gnome3, gtk3, gdk-pixbuf,
2− tag ? "", xvfb_run, dbus, glibcLocales, glib, glib-networking, gobject-introspection,
1+{ stdenv, fetchurl, python3, wrapGAppsHook, gettext, libsoup, gnome3, gtk3, gdk-pixbuf, librsvg,
2+ tag ? "", xvfb_run, dbus, glibcLocales, glib, glib-networking, gobject-introspection, hicolor-icon-theme,
33 gst_all_1, withGstPlugins ? true,
44 xineBackend ? false, xineLib,
55 withDbusPython ? false, withPyInotify ? false, withMusicBrainzNgs ? false, withPahoMqtt ? false,
@@ -9,16 +9,18 @@
99let optionals = stdenv.lib.optionals; in
1010python3.pkgs.buildPythonApplication rec {
1111 pname = "quodlibet${tag}";
12− version = "4.2.1";
12+ version = "4.3.0";
1313
1414 src = fetchurl {
1515 url = "https://github.com/quodlibet/quodlibet/releases/download/release-${version}/quodlibet-${version}.tar.gz";
16− sha256 = "0b1rvr4hqs2bjmhayms7vxxkn3d92k9v7p1269rjhf11hpk122l7";
16+ sha256 = "1q17ckblfa4fcs7wsjwsq1dj7360ymrdyjkyqmj864wzlqkw1rd2";
1717 };
1818
19+ patches = [ ./quodlibet-feedparser6.patch ];
20+
1921 nativeBuildInputs = [ wrapGAppsHook gettext ];
2022
21− checkInputs = [ gdk-pixbuf ] ++ (with python3.pkgs; [ pytest pytest_xdist polib xvfb_run dbus.daemon glibcLocales ]);
23+ checkInputs = [ gdk-pixbuf hicolor-icon-theme ] ++ (with python3.pkgs; [ pytest pytest_xdist polib xvfb_run dbus.daemon glibcLocales ]);
2224
2325 buildInputs = [ gnome3.adwaita-icon-theme libsoup glib glib-networking gtk3 webkitgtk gdk-pixbuf keybinder3 gtksourceview libmodplug libappindicator-gtk3 kakasi gobject-introspection ]
2426 ++ (if xineBackend then [ xineLib ] else with gst_all_1;
@@ -36,6 +38,10 @@ python3.pkgs.buildPythonApplication rec {
3638 pytestFlags = stdenv.lib.optionals (xineBackend || !withGstPlugins) [
3739 "--ignore=tests/plugin/test_replaygain.py"
3840 ] ++ [
41+ # requires networking
42+ "--ignore=tests/test_browsers_iradio.py"
43+ # the default theme doesn't have the required icons
44+ "--ignore=tests/plugin/test_trayicon.py"
3945 # upstream does actually not enforce source code linting
4046 "--ignore=tests/quality"
4147 # build failure on Arch Linux
@@ -45,7 +51,13 @@ python3.pkgs.buildPythonApplication rec {
4551
4652 checkPhase = ''
4753 runHook preCheck
54+ # newer gettext spews some warnings which fail the tests
55+ substituteInPlace tests/test_po.py --replace "strict=True" "strict=False"
56+ # otherwise tests can't find the app icons; instead of creating index.theme from scratch
57+ # I re-used the one from hicolor-icon-theme which seems to work
58+ cp "${hicolor-icon-theme}/share/icons/hicolor/index.theme" quodlibet/images/hicolor
4859 env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS" \
60+ GDK_PIXBUF_MODULE_FILE=${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
4961 HOME=$(mktemp -d) \
5062 xvfb-run -s '-screen 0 800x600x24' dbus-run-session \
5163 --config-file=${dbus.daemon}/share/dbus-1/session.conf \
@@ -73,7 +85,7 @@ python3.pkgs.buildPythonApplication rec {
7385 & internet radio, and all major audio formats.
7486 '';
7587
76− maintainers = with maintainers; [ coroa sauyon ];
88+ maintainers = with maintainers; [ coroa pbogdan ];
7789 homepage = "https://quodlibet.readthedocs.io/en/latest/";
7890 };
7991}
pkgs/applications/audio/quodlibet/quodlibet-feedparser6.patchnew file+12
@@ -0,0 +1,12 @@
1+Support feedparser 6, based on https://github.com/quodlibet/quodlibet/pull/3464
2+
3+--- a/quodlibet/browsers/audiofeeds.py
4++++ b/quodlibet/browsers/audiofeeds.py
5+@@ -137,7 +137,4 @@ class Feed(list):
6+ def parse(self):
7+ try:
8+- if not self._check_feed():
9+- return False
10+-
11+ doc = feedparser.parse(self.uri)
12+ except Exception as e: