Commit afed1365 authored by magicquark's avatar magicquark
Browse files

qt6Packages.qxlsx: add fix for qt 6.10

`qxlsx` is failing to build with `nix-pkg-review`, with this error:

qxlsx> CMake Error at CMakeLists.txt:167 (target_link_libraries):
qxlsx>   Target "QXlsx" links to:
qxlsx>
qxlsx>     Qt6::GuiPrivate
qxlsx>
qxlsx>   but the target was not found.

The upstream `qxlsx` has been patched to fix this, but as a new upstream
version has not been released, this fix is not present in `nixpkgs` even
though `nixpkgs` has now bumped `qt6` to version 6.10.0 in PR 449572.

Thus, directly apply the patch made in this commit:
https://github.com/QtExcel/QXlsx/commit/90d762625750c6b2c73f6cd96b633e9158aed72e
parent aaea22d0
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  qtbase,
}:
@@ -17,6 +18,14 @@ stdenv.mkDerivation rec {
    hash = "sha256-twOlAiLE0v7+9nWo/Gd+oiKT1umL3UnG1Xa0zDG7u7s=";
  };

  patches = [
    # Fix for Qt 6.10, can likely be removed when version bump passes v1.5.0.
    (fetchpatch {
      url = "https://github.com/QtExcel/QXlsx/commit/90d762625750c6b2c73f6cd96b633e9158aed72e.patch";
      hash = "sha256-/0xLrkjuJGZRocK1EyBhuaUmg0usueQz2F340DkQhb0=";
    })
  ];

  nativeBuildInputs = [ cmake ];
  buildInputs = [ qtbase ];