about summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorquinn <quinn@385yw.de>2023-04-30 18:03:51 +0200
committerquinn <quinn@385yw.de>2023-04-30 18:58:10 +0200
commit239286eb094120bcad9e4fc4c91ca73e3a6f752a (patch)
tree0168a842addabfd690e801719433fb67f84f4078 /pkgs/applications/graphics
parent3056e9c39564559985ed9ed514f4789fb93a00ce (diff)
veusz: 3.3.1 -> 3.6.2
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/veusz/default.nix23
1 files changed, 11 insertions, 12 deletions
diff --git a/pkgs/applications/graphics/veusz/default.nix b/pkgs/applications/graphics/veusz/default.nix
index cb57f87fc6622..1ef77cbe4f1b4 100644
--- a/pkgs/applications/graphics/veusz/default.nix
+++ b/pkgs/applications/graphics/veusz/default.nix
@@ -6,14 +6,18 @@
 
 python3Packages.buildPythonApplication rec {
   pname = "veusz";
-  version = "3.3.1";
+  version = "3.6.2";
 
   src = python3Packages.fetchPypi {
     inherit pname version;
-    sha256 = "4ClgYwiU21wHDve2q9cItSAVb9hbR2F+fJc8znGI8OA=";
+    sha256 = "whcaxF5LMEJNj8NSYeLpnb5uJboRl+vCQ1WxBrJjldE=";
   };
 
-  nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip_4 ];
+  nativeBuildInputs = [
+    wrapQtAppsHook
+    python3Packages.sip
+    python3Packages.tomli
+  ];
 
   buildInputs = [ qtbase ];
 
@@ -24,22 +28,17 @@ python3Packages.buildPythonApplication rec {
     wrapQtApp "$out/bin/veusz"
   '';
 
-  # Since sip 6 (we use sip 4 here, but pyqt5 is built with sip 6), sip files are
-  # placed in a different directory layout and --sip-dir won't work anymore.
-  # --sip-dir expects a directory with a PyQt5 subdirectory (where sip files are located),
-  # but the new directory layout places sip files in a subdirectory named 'bindings'.
-  # To workaround this, we patch the full path into pyqtdistutils.py.
+  # pyqt_setuptools.py uses the platlib path from sysconfig, but NixOS doesn't
+  # really have a corresponding path, so patching the location of PyQt5 inplace
   postPatch = ''
-    substituteInPlace pyqtdistutils.py \
-      --replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings',"
+    substituteInPlace pyqt_setuptools.py \
+      --replace "get_path('platlib')" "'${python3Packages.pyqt5}/${python3Packages.python.sitePackages}'"
     patchShebangs tests/runselftest.py
   '';
 
   # you can find these options at
   # https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L71
-  # --sip-dir cannot be used here for the reasons explained above
   setupPyBuildFlags = [
-    "--qt-include-dir=${qtbase.dev}/include"
     # veusz tries to find a libinfix and fails without one
     # but we simply don't need a libinfix, so set it to empty here
     "--qt-libinfix="