From 5c30edb481c1b419a154eb4383d388c528813803 Mon Sep 17 00:00:00 2001 From: Sam Connelly Date: Wed, 16 Oct 2024 06:56:27 -0400 Subject: [PATCH] cemu-ti: Fix build failure --- pkgs/applications/science/math/cemu-ti/default.nix | 5 +++++ .../math/cemu-ti/resolve-ambiguous-constexpr.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/applications/science/math/cemu-ti/resolve-ambiguous-constexpr.patch diff --git a/pkgs/applications/science/math/cemu-ti/default.nix b/pkgs/applications/science/math/cemu-ti/default.nix index 547b57b312db..e1fa87c4bd3a 100644 --- a/pkgs/applications/science/math/cemu-ti/default.nix +++ b/pkgs/applications/science/math/cemu-ti/default.nix @@ -21,6 +21,11 @@ stdenv.mkDerivation (finalAttrs: { sourceRoot = "${finalAttrs.src.name}/gui/qt/"; + patches = [ + # This is resolved upstream, but I can't apply the patch because the + # sourceRoot isn't set to the base of the Git repo. + ./resolve-ambiguous-constexpr.patch + ]; nativeBuildInputs = [ cmake diff --git a/pkgs/applications/science/math/cemu-ti/resolve-ambiguous-constexpr.patch b/pkgs/applications/science/math/cemu-ti/resolve-ambiguous-constexpr.patch new file mode 100644 index 000000000000..572fffc062e0 --- /dev/null +++ b/pkgs/applications/science/math/cemu-ti/resolve-ambiguous-constexpr.patch @@ -0,0 +1,13 @@ +diff --git a/mainwindow.cpp b/mainwindow.cpp +index f03a743e..70c29a45 100644 +--- a/mainwindow.cpp ++++ b/mainwindow.cpp +@@ -970,7 +970,7 @@ void MainWindow::showEvent(QShowEvent *e) { + DockWidget *MainWindow::redistributeFindDock(const QPoint &pos) { + QWidget *child = childAt(pos); + if (QTabBar *tabBar = findSelfOrParent(child)) { +- child = childAt({pos.x(), tabBar->mapTo(this, QPoint{}).y() - 1}); ++ child = childAt(QPoint({pos.x(), tabBar->mapTo(this, QPoint{}).y() - 1})); + } + return findSelfOrParent(child); + }