From c9bd45f6dc65f0005f9632d3bc367b82e9ce3f41 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 23 Jun 2025 12:36:04 +0200 Subject: [PATCH 1/2] quodlibet: 4.6.0-unstable-2024-08-08 -> 4.7.1 --- pkgs/applications/audio/quodlibet/default.nix | 18 ++++++++++++------ ...h => fix-gdist-python-3.12-and-newer.patch} | 0 2 files changed, 12 insertions(+), 6 deletions(-) rename pkgs/applications/audio/quodlibet/{fix-gdist-python-3.12.patch => fix-gdist-python-3.12-and-newer.patch} (100%) diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index ee2b4f8a842b..bca4a6e28452 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -43,10 +43,9 @@ python3, xvfb-run, }: - -python3.pkgs.buildPythonApplication { +python3.pkgs.buildPythonApplication rec { pname = "quodlibet${tag}"; - version = "4.6.0-unstable-2024-08-08"; + version = "4.7.1"; pyproject = true; outputs = [ @@ -57,14 +56,21 @@ python3.pkgs.buildPythonApplication { src = fetchFromGitHub { owner = "quodlibet"; repo = "quodlibet"; - rev = "3dcf31dfc8db9806d1f73a47fdabc950d35ded1d"; - hash = "sha256-8qWuxTvMF6ksDkbZ6wRLPCJK1cSqgGMPac/ht6qVpnA="; + tag = "release-${version}"; + hash = "sha256-xr3c1e4tjw2YHuKbvNeUPBIFdHEcpztqXjHVDSSxYlo="; }; - patches = [ ./fix-gdist-python-3.12.patch ]; + # Fix "E ModuleNotFoundError: No module named 'distutils'" in Python 3.12 or newer + patches = [ ./fix-gdist-python-3.12-and-newer.patch ]; build-system = [ python3.pkgs.setuptools ]; + postPatch = '' + # Fix "FileExistsError: File already exists: /nix/store/<...>-quodlibet-4.7.1/bin/quodlibet" + substituteInPlace pyproject.toml \ + --replace-fail 'quodlibet = "quodlibet.main:main"' "" + ''; + nativeBuildInputs = [ gettext diff --git a/pkgs/applications/audio/quodlibet/fix-gdist-python-3.12.patch b/pkgs/applications/audio/quodlibet/fix-gdist-python-3.12-and-newer.patch similarity index 100% rename from pkgs/applications/audio/quodlibet/fix-gdist-python-3.12.patch rename to pkgs/applications/audio/quodlibet/fix-gdist-python-3.12-and-newer.patch From 0480b545101520d4d37ccbb64683968d9332f500 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Mon, 23 Jun 2025 12:36:38 +0200 Subject: [PATCH 2/2] quodlibet: clean up derivation --- pkgs/applications/audio/quodlibet/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/quodlibet/default.nix b/pkgs/applications/audio/quodlibet/default.nix index bca4a6e28452..629621b1fd5e 100644 --- a/pkgs/applications/audio/quodlibet/default.nix +++ b/pkgs/applications/audio/quodlibet/default.nix @@ -7,6 +7,7 @@ gettext, gobject-introspection, wrapGAppsHook3, + writableTmpDirAsHomeHook, # runtime adwaita-icon-theme, @@ -133,6 +134,7 @@ python3.pkgs.buildPythonApplication rec { glibcLocales hicolor-icon-theme xvfb-run + writableTmpDirAsHomeHook ] ++ (with python3.pkgs; [ polib @@ -158,7 +160,6 @@ python3.pkgs.buildPythonApplication rec { preCheck = '' 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" ''; @@ -173,7 +174,7 @@ python3.pkgs.buildPythonApplication rec { ''; preFixup = lib.optionalString (kakasi != null) '' - gappsWrapperArgs+=(--prefix PATH : ${kakasi}/bin) + gappsWrapperArgs+=(--prefix PATH : ${lib.getBin kakasi}) ''; meta = with lib; {