From cf17476c02dd792383b47ed0a426b21c23126f8f Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Tue, 2 Apr 2024 09:35:16 +0200 Subject: puddletag: fix for pyparsing 3.1.2 --- pkgs/applications/audio/puddletag/default.nix | 35 +++++++++++++++------------ 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'pkgs/applications/audio') diff --git a/pkgs/applications/audio/puddletag/default.nix b/pkgs/applications/audio/puddletag/default.nix index ddeee09d829d..3b6e215d2ffb 100644 --- a/pkgs/applications/audio/puddletag/default.nix +++ b/pkgs/applications/audio/puddletag/default.nix @@ -1,24 +1,12 @@ { lib , fetchFromGitHub +, fetchurl , python3 +, qtbase +, qtwayland , wrapQtAppsHook }: -# As of 2.1, puddletag has started pinning versions of all dependencies that it -# was built against which is an issue as the chances of us having the exact same -# versions in nixpkgs are slim to none. -# -# There is a difference between explicit and implicit version requirements and -# we should be able to safely ignore the latter. Therefore use requirements.in -# which contains just the explicit version dependencies instead of -# requirements.txt. -# -# Additionally, we do need to override some of the explicit requirements through -# `overrideVersions`. While we technically run the risk of breaking something by -# ignoring the pinned versions, it's just something we will have to accept -# unless we want to vendor those versions. - - python3.pkgs.buildPythonApplication rec { pname = "puddletag"; version = "2.3.0"; @@ -31,6 +19,14 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-oScT8YcQoDf2qZ+J7xKm22Sbfym3tkVUrWT5D2LU5e8="; }; + patches = [ + (fetchurl { + url = "https://github.com/puddletag/puddletag/commit/54074824adb05da42c03d7adfbba94d8e24982f0.patch"; + hash = "sha256-DkgaFWgp2m2bRuhdXhHW+nxV/2GaCgeRNdwLMYAkcYQ="; + name = "fix_for_pyparsing_3_1_2.patch"; + }) + ]; + pythonRelaxDeps = true; pythonRemoveDeps = [ @@ -43,6 +39,11 @@ python3.pkgs.buildPythonApplication rec { --replace share/pixmaps share/icons ''; + buildInputs = [ + qtbase + qtwayland + ]; + nativeBuildInputs = [ python3.pkgs.pythonRelaxDepsHook wrapQtAppsHook @@ -63,11 +64,13 @@ python3.pkgs.buildPythonApplication rec { # the file should be executable but it isn't so our wrapper doesn't run preFixup = '' chmod 555 $out/bin/puddletag - wrapQtApp $out/bin/puddletag + makeWrapperArgs+=("''${qtWrapperArgs[@]}") ''; doCheck = false; # there are no tests + dontWrapQtApps = true; # to avoid double-wrapping + dontStrip = true; # we are not generating any binaries meta = with lib; { -- cgit 1.4.1