From c373e02922136afaba644af18c13a54ff872c359 Mon Sep 17 00:00:00 2001 From: Pavel Sobolev Date: Wed, 23 Aug 2023 13:07:39 +0300 Subject: [PATCH 1/2] quodlibet: refactor --- pkgs/applications/audio/quodlibet/default.nix | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index f0dc71aa4775..c800320c861c 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -3,12 +3,12 @@ , fetchpatch , tag ? "" -# build time + # build time , gettext , gobject-introspection , wrapGAppsHook -# runtime + # runtime , adwaita-icon-theme , gdk-pixbuf , glib @@ -23,20 +23,22 @@ , libsoup , webkitgtk -# optional features + # optional features , withDbusPython ? false -, withPypresence ? false -, withPyInotify ? false , withMusicBrainzNgs ? false , withPahoMqtt ? false +, withPyInotify ? false +, withPypresence ? false , withSoco ? false -# backends -, withGstreamerBackend ? true, gst_all_1 + # backends , withGstPlugins ? withGstreamerBackend -, withXineBackend ? true, xine-lib +, withGstreamerBackend ? true +, gst_all_1 +, withXineBackend ? true +, xine-lib -# tests + # tests , dbus , glibcLocales , hicolor-icon-theme @@ -46,9 +48,11 @@ python3.pkgs.buildPythonApplication rec { pname = "quodlibet${tag}"; - version = "4.5.0"; + version = "4.6.0"; format = "pyproject"; + outputs = [ "out" "doc" ]; + src = fetchFromGitHub { owner = "quodlibet"; repo = "quodlibet"; @@ -64,18 +68,13 @@ python3.pkgs.buildPythonApplication rec { }) ]; - outputs = [ - "out" - "doc" - ]; - nativeBuildInputs = [ gettext gobject-introspection wrapGAppsHook ] ++ (with python3.pkgs; [ - sphinxHook sphinx-rtd-theme + sphinxHook ]); buildInputs = [ @@ -111,14 +110,12 @@ python3.pkgs.buildPythonApplication rec { pygobject3 ] ++ lib.optionals withDbusPython [ dbus-python ] - ++ lib.optionals withPypresence [ pypresence ] - ++ lib.optionals withPyInotify [ pyinotify ] ++ lib.optionals withMusicBrainzNgs [ musicbrainzngs ] ++ lib.optionals withPahoMqtt [ paho-mqtt ] + ++ lib.optionals withPyInotify [ pyinotify ] + ++ lib.optionals withPypresence [ pypresence ] ++ lib.optionals withSoco [ soco ]; - LC_ALL = "en_US.UTF-8"; - nativeCheckInputs = [ dbus gdk-pixbuf @@ -145,10 +142,12 @@ python3.pkgs.buildPythonApplication rec { "--ignore=tests/plugin/test_replaygain.py" ]; + env.LC_ALL = "en_US.UTF-8"; + preCheck = '' - export XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS" export GDK_PIXBUF_MODULE_FILE=${librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache export HOME=$(mktemp -d) + export XDG_DATA_DIRS="$out/share:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_ICON_DIRS:$XDG_DATA_DIRS" ''; checkPhase = '' @@ -167,8 +166,6 @@ python3.pkgs.buildPythonApplication rec { meta = with lib; { description = "GTK-based audio player written in Python, using the Mutagen tagging library"; - license = licenses.gpl2Plus; - longDescription = '' Quod Libet is a GTK-based audio player written in Python, using the Mutagen tagging library. It's designed around the idea that @@ -182,8 +179,12 @@ python3.pkgs.buildPythonApplication rec { player, like Unicode support, tag editing, Replay Gain, podcasts & internet radio, and all major audio formats. ''; - - maintainers = with maintainers; [ coroa pbogdan ]; - homepage = "https://quodlibet.readthedocs.io/en/latest/"; + homepage = "https://quodlibet.readthedocs.io/en/latest"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ + coroa + paveloom + pbogdan + ]; }; } From acccb8f07bd0b98a3d4c52becd82f181ef67a860 Mon Sep 17 00:00:00 2001 From: Pavel Sobolev Date: Wed, 23 Aug 2023 13:51:24 +0300 Subject: [PATCH 2/2] quodlibet: 4.5.0 -> 4.6.0 --- pkgs/applications/audio/quodlibet/default.nix | 25 ++++--------------- pkgs/top-level/all-packages.nix | 5 ++++ 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index c800320c861c..eacce636df4e 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -1,6 +1,5 @@ { lib , fetchFromGitHub -, fetchpatch , tag ? "" # build time @@ -57,17 +56,9 @@ python3.pkgs.buildPythonApplication rec { owner = "quodlibet"; repo = "quodlibet"; rev = "refs/tags/release-${version}"; - hash = "sha256-G6zcdnHkevbVCrMoseWoSia5ajEor8nZhee6NeZIs8Q="; + hash = "sha256-dkO/CFN7Dk72xhtmcSDcwUciOPMeEjQS2mch+jSfiII="; }; - patches = [ - (fetchpatch { - # Fixes cover globbing under python 3.10.5+ - url = "https://github.com/quodlibet/quodlibet/commit/5eb7c30766e1dcb30663907664855ee94a3accc0.patch"; - hash = "sha256-bDyEOE7Vs4df4BeN4QMvt6niisVEpvc1onmX5rtoAWc="; - }) - ]; - nativeBuildInputs = [ gettext gobject-introspection @@ -129,15 +120,13 @@ python3.pkgs.buildPythonApplication rec { ]); pytestFlags = [ - # requires networking - "--deselect=tests/test_browsers_iradio.py::TIRFile::test_download_tags" # missing translation strings in potfiles "--deselect=tests/test_po.py::TPOTFILESIN::test_missing" + # require networking + "--deselect=tests/plugin/test_covers.py::test_live_cover_download" + "--deselect=tests/test_browsers_iradio.py::TInternetRadio::test_click_add_station" # 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" ] ++ lib.optionals (withXineBackend || !withGstPlugins) [ "--ignore=tests/plugin/test_replaygain.py" ]; @@ -181,10 +170,6 @@ python3.pkgs.buildPythonApplication rec { ''; homepage = "https://quodlibet.readthedocs.io/en/latest"; license = licenses.gpl2Plus; - maintainers = with maintainers; [ - coroa - paveloom - pbogdan - ]; + maintainers = with maintainers; [ coroa paveloom pbogdan ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 887e05b63691..792d92f141f8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35143,14 +35143,17 @@ with pkgs; keybinder3 = null; libappindicator-gtk3 = null; libmodplug = null; + libsoup = libsoup_3; }; quodlibet-without-gst-plugins = quodlibet.override { + libsoup = libsoup_3; tag = "-without-gst-plugins"; withGstPlugins = false; }; quodlibet-xine = quodlibet.override { + libsoup = libsoup_3; tag = "-xine"; withGstreamerBackend = false; withXineBackend = true; @@ -35162,6 +35165,7 @@ with pkgs; keybinder3 = keybinder3; libappindicator-gtk3 = libappindicator-gtk3; libmodplug = libmodplug; + libsoup = libsoup_3; tag = "-full"; withDbusPython = true; withMusicBrainzNgs = true; @@ -35172,6 +35176,7 @@ with pkgs; }; quodlibet-xine-full = quodlibet-full.override { + libsoup = libsoup_3; tag = "-xine-full"; withGstreamerBackend = false; withXineBackend = true;