From 80875a7fcc10a83e65ef17c6e6eaa1a5bf4ebf3d Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 14 Nov 2025 23:17:41 +0100 Subject: [PATCH] qt6Packages.qzxing: Fix build Upstream QMake code doesn't use the correct functions for version-gating code. --- pkgs/development/libraries/qzxing/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/qzxing/default.nix b/pkgs/development/libraries/qzxing/default.nix index e8ac307dfe0f..474267b3a365 100644 --- a/pkgs/development/libraries/qzxing/default.nix +++ b/pkgs/development/libraries/qzxing/default.nix @@ -19,6 +19,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-ASgsF5ocNWAiIy2jm6ygpDkggBcEpno6iVNWYkuWcVI="; }; + # greaterThan/lessThan don't handle versions, use versionAtLeast/versionAtMost instead + # Versions are different due to versionAtLeast/-Most using an inclusive limit, while greater-/lessThan use exclusive ones + postPatch = '' + substituteInPlace src/QZXing-components.pri \ + --replace-fail 'lessThan(QT_VERSION, 6.2)' 'versionAtMost(QT_VERSION, 6.1)' \ + --replace-fail 'greaterThan(QT_VERSION, 6.1)' 'versionAtLeast(QT_VERSION, 6.2)' + ''; + # QMake can't find qtmultimedia in buildInputs strictDeps = false;