Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt5.qtbase: ignore hook propagated from buildPlatform #264964

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pkgs/development/libraries/qt-5/5.15/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the build tools?

++ lib.optional stdenv.isLinux qtwayland.dev;
} ../hooks/wrap-qt-apps-hook.sh) { };
};
Expand Down
10 changes: 10 additions & 0 deletions pkgs/development/libraries/qt-5/hooks/qtbase-setup-hook.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/libraries/qt-5/modules/qtbase.nix
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ stdenv.mkDerivation (finalAttrs: ({
dontStrip = debugSymbols;

setupHook = ../hooks/qtbase-setup-hook.sh;
env.qtbase_stdenv = stdenv.outPath;
Copy link
Member

@Artturin Artturin Nov 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overrides env, has to be moved to the env block

qtbase-aarch64-unknown-linux-gnu> qxcbcursor.cpp: In constructor 'QXcbCursor::QXcbCursor(QXcbConnection*, QXcbScreen*)':
qtbase-aarch64-unknown-linux-gnu> qxcbcursor.cpp:320:43: error: 'NIXPKGS_LIBXCURSOR' was not declared in this scope
qtbase-aarch64-unknown-linux-gnu>   320 |         QLibrary xcursorLib(QLatin1String(NIXPKGS_LIBXCURSOR), 1);
qtbase-aarch64-unknown-linux-gnu>       |                                           ^~~~~~~~~~~~~~~~~~


passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;

Expand Down
4 changes: 2 additions & 2 deletions pkgs/misc/frescobaldi/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, buildPythonApplication, fetchFromGitHub, python3Packages, pyqtwebengine, lilypond }:
{ lib, stdenv, buildPythonApplication, fetchFromGitHub, python3Packages, pyqtwebengine, lilypond, gettext }:

buildPythonApplication rec {
pname = "frescobaldi";
Expand All @@ -22,7 +22,7 @@ buildPythonApplication rec {
pyqtwebengine
];

nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook ];
nativeBuildInputs = [ pyqtwebengine.wrapQtAppsHook gettext ];

# Needed because source is fetched from git
preBuild = ''
Expand Down