summary refs log tree commit diff
path: root/pkgs/applications/graphics
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2021-06-27 01:41:19 -0300
committerGitHub <noreply@github.com>2021-06-27 01:41:19 -0300
commitf5b9a25cdd21b4e45ab5f11c27b95dfe17384274 (patch)
treef1de186270ee6446c6344f3546ee0a1bf4248a5d /pkgs/applications/graphics
parentffabe30bb200abe66466ebee1e03870da87ff541 (diff)
parent015fa4e53e0ff069abbea93ccecc9c84571311fd (diff)
downloadnixpkgs-f5b9a25cdd21b4e45ab5f11c27b95dfe17384274.tar
nixpkgs-f5b9a25cdd21b4e45ab5f11c27b95dfe17384274.tar.gz
nixpkgs-f5b9a25cdd21b4e45ab5f11c27b95dfe17384274.tar.bz2
nixpkgs-f5b9a25cdd21b4e45ab5f11c27b95dfe17384274.tar.lz
nixpkgs-f5b9a25cdd21b4e45ab5f11c27b95dfe17384274.tar.xz
nixpkgs-f5b9a25cdd21b4e45ab5f11c27b95dfe17384274.tar.zst
nixpkgs-f5b9a25cdd21b4e45ab5f11c27b95dfe17384274.zip
Merge pull request #123378 from eduardosm/sip_6
python3Packages.sip: 5.5.0 -> 6.1.1;
pythonPackages.pyqt5: 5.15.2 -> 5.15.4;
python3Packages.pyqt-builder: 1.6.0 -> 1.10.1
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r--pkgs/applications/graphics/krita/default.nix4
-rw-r--r--pkgs/applications/graphics/veusz/default.nix16
2 files changed, 10 insertions, 10 deletions
diff --git a/pkgs/applications/graphics/krita/default.nix b/pkgs/applications/graphics/krita/default.nix
index 1a83fe9931f..85830f9a045 100644
--- a/pkgs/applications/graphics/krita/default.nix
+++ b/pkgs/applications/graphics/krita/default.nix
@@ -32,8 +32,8 @@ mkDerivation rec {
     ++ lib.optional stdenv.cc.isGNU "-Wno-deprecated-copy";
 
   cmakeFlags = [
-    "-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/share/sip/PyQt5"
-    "-DPYQT_SIP_DIR_OVERRIDE=${python3Packages.pyqt5}/share/sip/PyQt5"
+    "-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings"
+    "-DPYQT_SIP_DIR_OVERRIDE=${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings"
     "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
   ];
 
diff --git a/pkgs/applications/graphics/veusz/default.nix b/pkgs/applications/graphics/veusz/default.nix
index 5c5b1c91709..d8f1ae76a88 100644
--- a/pkgs/applications/graphics/veusz/default.nix
+++ b/pkgs/applications/graphics/veusz/default.nix
@@ -14,7 +14,7 @@ python3Packages.buildPythonApplication rec {
     sha256 = "4ClgYwiU21wHDve2q9cItSAVb9hbR2F+fJc8znGI8OA=";
   };
 
-  nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip ];
+  nativeBuildInputs = [ wrapQtAppsHook python3Packages.sip_4 ];
 
   buildInputs = [ qtbase ];
 
@@ -25,21 +25,21 @@ python3Packages.buildPythonApplication rec {
     wrapQtApp "$out/bin/veusz"
   '';
 
-  # For some reason, if sip5 is found on the PATH, the option --sip-dir is
-  # ignored in setupPyBuildFlags, see
-  # https://github.com/veusz/veusz/blob/53b99dffa999f2bc41fdc5335d7797ae857c761f/pyqtdistutils.py#L292
+  # 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.
   postPatch = ''
     substituteInPlace pyqtdistutils.py \
-      --replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/share/sip/PyQt5',"
+      --replace "'-I', pyqt5_include_dir," "'-I', '${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings',"
     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 = [
-    # --sip-dir does nothing here, but it should be the correct way to set the
-    # sip_dir, so I'm leaving it here for future versions
-    "--sip-dir=${python3Packages.pyqt5}/share/sip"
     "--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