From a7298c509f815179c2093564286eed3608b90acd Mon Sep 17 00:00:00 2001 From: Suchiman Date: Thu, 10 Sep 2026 23:19:20 +0200 Subject: [PATCH] Fix Nix build: point qmake at qttools' lrelease binary qmake's qtPrepareTool() macro hardcodes tool lookups (like lrelease) to qtbase's own store output at mkspecs-generation time. On nixpkgs, lrelease lives in kdePackages.qttools instead, which is a separate derivation, so the build failed with "No such file or directory" once CONFIG += lrelease was introduced. Pass QT_TOOL.lrelease.binary explicitly on the qmake command line to point at the real binary. --- flake.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 2480e97..9d56ede 100644 --- a/flake.nix +++ b/flake.nix @@ -28,7 +28,12 @@ nativeBuildInputs = with pkgs.kdePackages; [ qmake qttools wrapQtAppsHook ]; buildInputs = with pkgs.kdePackages; [ qtbase ]; - configurePhase = "qmake6 $src/src"; + # qmake's qtPrepareTool() hardcodes tool lookups to qtbase's own store + # path at mkspecs-generation time, but nixpkgs ships lrelease in + # kdePackages.qttools instead. Point it at the real binary explicitly. + configurePhase = '' + qmake6 $src/src "QT_TOOL.lrelease.binary=${pkgs.kdePackages.qttools}/bin/lrelease" + ''; buildPhase = "make -j$NIX_BUILD_CORES"; installPhase = ''