about summary refs log tree commit diff
path: root/pkgs/applications/audio/puddletag
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2024-04-02 09:35:16 +0200
committerPeter Hoeg <peter@hoeg.com>2024-04-02 09:35:16 +0200
commitcf17476c02dd792383b47ed0a426b21c23126f8f (patch)
tree82b34e96b0a10153f0985956347ab97ee2c38c46 /pkgs/applications/audio/puddletag
parentd8fe5e6c92d0d190646fb9f1056741a229980089 (diff)
puddletag: fix for pyparsing 3.1.2
Diffstat (limited to 'pkgs/applications/audio/puddletag')
-rw-r--r--pkgs/applications/audio/puddletag/default.nix35
1 files changed, 19 insertions, 16 deletions
diff --git a/pkgs/applications/audio/puddletag/default.nix b/pkgs/applications/audio/puddletag/default.nix
index ddeee09d829df..3b6e215d2ffbd 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; {