From b2a7d4739e7be3c553c5bc7c9b51b6b974a8918b Mon Sep 17 00:00:00 2001 From: Jason Heard Date: Wed, 15 Jan 2020 17:06:59 -0700 Subject: [PATCH 1/3] quodlibet: fix tests - Add XDG_ICONS_DIRS to XDG_DATA_DIRS so tests can see icons. - Skip quality tests and remove their dependencies. - Add gdk-pixbuf to checkInputs to fix a test that uses SVGs. --- pkgs/applications/audio/quodlibet/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index 573dca518e3..4dfa3c0e654 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -18,7 +18,7 @@ python3.pkgs.buildPythonApplication rec { nativeBuildInputs = [ wrapGAppsHook gettext ]; - checkInputs = with python3.pkgs; [ pytest pytest_xdist pyflakes pycodestyle polib xvfb_run dbus.daemon glibcLocales ]; + checkInputs = [ gdk-pixbuf ] ++ (with python3.pkgs; [ pytest pytest_xdist polib xvfb_run dbus.daemon glibcLocales ]); buildInputs = [ gnome3.adwaita-icon-theme libsoup glib glib-networking gtk3 webkitgtk gdk-pixbuf keybinder3 gtksourceview libmodplug libappindicator-gtk3 kakasi gobject-introspection ] ++ (if xineBackend then [ xineLib ] else with gst_all_1; @@ -35,11 +35,11 @@ python3.pkgs.buildPythonApplication rec { checkPhase = '' runHook preCheck - env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS" \ + env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS" \ HOME=$(mktemp -d) \ xvfb-run -s '-screen 0 800x600x24' dbus-run-session \ --config-file=${dbus.daemon}/share/dbus-1/session.conf \ - py.test${stdenv.lib.optionalString (xineBackend || !withGstPlugins) " --ignore=tests/plugin/test_replaygain.py"} + py.test ${stdenv.lib.optionalString (xineBackend || !withGstPlugins) " --ignore=tests/plugin/test_replaygain.py"} --ignore=tests/quality runHook postCheck ''; @@ -65,6 +65,5 @@ python3.pkgs.buildPythonApplication rec { maintainers = with maintainers; [ coroa sauyon ]; homepage = https://quodlibet.readthedocs.io/en/latest/; - broken = true; }; } From a185bb25831aea3102b0257094978e2cc57a1287 Mon Sep 17 00:00:00 2001 From: Jason Heard Date: Fri, 17 Jan 2020 16:33:37 -0700 Subject: [PATCH 2/3] quodlibet: exclude test - Excluded test_operon.py as it fails on ArchLinux for @sauyon. --- pkgs/applications/audio/quodlibet/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index 4dfa3c0e654..533c4b2f50f 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -39,7 +39,7 @@ python3.pkgs.buildPythonApplication rec { HOME=$(mktemp -d) \ xvfb-run -s '-screen 0 800x600x24' dbus-run-session \ --config-file=${dbus.daemon}/share/dbus-1/session.conf \ - py.test ${stdenv.lib.optionalString (xineBackend || !withGstPlugins) " --ignore=tests/plugin/test_replaygain.py"} --ignore=tests/quality + py.test ${stdenv.lib.optionalString (xineBackend || !withGstPlugins) " --ignore=tests/plugin/test_replaygain.py"} --ignore=tests/quality --ignore=tests/test_operon.py runHook postCheck ''; From 00a8de028e93ffc3a2b4bab0c90da3a9d1c62669 Mon Sep 17 00:00:00 2001 From: Jason Heard Date: Sat, 18 Jan 2020 10:35:11 -0700 Subject: [PATCH 3/3] quodlibet: improve formatting and add comments --- pkgs/applications/audio/quodlibet/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index 533c4b2f50f..597cf68f4d0 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -33,13 +33,23 @@ python3.pkgs.buildPythonApplication rec { LC_ALL = "en_US.UTF-8"; + 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" + ]; + checkPhase = '' runHook preCheck env XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS" \ HOME=$(mktemp -d) \ xvfb-run -s '-screen 0 800x600x24' dbus-run-session \ --config-file=${dbus.daemon}/share/dbus-1/session.conf \ - py.test ${stdenv.lib.optionalString (xineBackend || !withGstPlugins) " --ignore=tests/plugin/test_replaygain.py"} --ignore=tests/quality --ignore=tests/test_operon.py + py.test $pytestFlags runHook postCheck '';