diff --git a/pkgs/development/libraries/qt-5/5.15/default.nix b/pkgs/development/libraries/qt-5/5.15/default.nix index a2b38046c5a83..72e64f6904bd6 100644 --- a/pkgs/development/libraries/qt-5/5.15/default.nix +++ b/pkgs/development/libraries/qt-5/5.15/default.nix @@ -342,9 +342,7 @@ let qmake = callPackage ({ qtbase }: makeSetupHook { name = "qmake-hook"; - ${if stdenv.buildPlatform == stdenv.hostPlatform - then "propagatedBuildInputs" - else "depsTargetTargetPropagated"} = [ qtbase.dev ]; + depsTargetTargetPropagated = [ qtbase.dev ]; substitutions = { inherit debug; fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh; @@ -353,7 +351,8 @@ let wrapQtAppsHook = callPackage ({ makeBinaryWrapper, qtbase, qtwayland }: makeSetupHook { name = "wrap-qt5-apps-hook"; - propagatedBuildInputs = [ qtbase.dev makeBinaryWrapper ] + propagatedBuildInputs = [ makeBinaryWrapper ]; + depsTargetTargetPropagated = [ qtbase.dev ] ++ lib.optional stdenv.isLinux qtwayland.dev; } ../hooks/wrap-qt-apps-hook.sh) { }; }; diff --git a/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh b/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh index 1b57d676e1fc5..ccd7592dfd37e 100644 --- a/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh +++ b/pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh @@ -1,3 +1,13 @@ +if [[ "x$stdenv" != "x@qtbase_stdenv@" ]]; then + echo "skipping qtbase-setup-hook.sh because of mismatch:" + echo " stdenv of current derivation: $stdenv" + echo " stdenv of qtbase.dev dependency: @qtbase_stdenv@" + echo " qtbase = @dev@" + return +fi + +echo "running qtbase-setup-hook.sh with hostOffset=$hostOffset targetOffset=$targetOffset: @out@" + if [[ -n "${__nix_qtbase-}" ]]; then # Throw an error if a different version of Qt was already set up. if [[ "$__nix_qtbase" != "@dev@" ]]; then diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index 67e9bd5440d11..eea9b73725ebd 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -391,6 +391,7 @@ stdenv.mkDerivation (finalAttrs: ({ dontStrip = debugSymbols; setupHook = ../hooks/qtbase-setup-hook.sh; + env.qtbase_stdenv = stdenv.outPath; passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; diff --git a/pkgs/misc/frescobaldi/default.nix b/pkgs/misc/frescobaldi/default.nix index 57baeb7fe828f..5be22418a92f6 100644 --- a/pkgs/misc/frescobaldi/default.nix +++ b/pkgs/misc/frescobaldi/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, buildPythonApplication, fetchFromGitHub, python3Packages, pyqtwebengine, lilypond }: +{ lib, stdenv, buildPythonApplication, fetchFromGitHub, python3Packages, pyqtwebengine, lilypond, gettext }: buildPythonApplication rec { pname = "frescobaldi"; @@ -22,7 +22,7 @@ buildPythonApplication rec { pyqtwebengine ]; - nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ]; + nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook gettext ]; # Needed because source is fetched from git preBuild = ''