From 80875a7fcc10a83e65ef17c6e6eaa1a5bf4ebf3d Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 14 Nov 2025 23:17:41 +0100 Subject: [PATCH 1/2] 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; From 575498d62884eda49f64594b2317597dc5e9b33b Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Fri, 14 Nov 2025 23:19:08 +0100 Subject: [PATCH 2/2] {libsForQt5.qzxing,qt6Packages.qzxing}: Drop meta-wide with lib --- pkgs/development/libraries/qzxing/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/qzxing/default.nix b/pkgs/development/libraries/qzxing/default.nix index 474267b3a365..1159a6c9819c 100644 --- a/pkgs/development/libraries/qzxing/default.nix +++ b/pkgs/development/libraries/qzxing/default.nix @@ -55,12 +55,12 @@ stdenv.mkDerivation (finalAttrs: { updateScript = nix-update-script { }; }; - meta = with lib; { + meta = { description = "Qt/QML wrapper library for the ZXing library"; homepage = "https://github.com/ftylitak/qzxing"; - license = licenses.asl20; - maintainers = with maintainers; [ OPNA2608 ]; - platforms = platforms.unix; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ OPNA2608 ]; + platforms = lib.platforms.unix; pkgConfigModules = [ "QZXing" ];