From 974bcac2df2b8445527b9607b7d2785882e7422e Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sun, 14 Dec 2025 12:54:48 +0100 Subject: [PATCH] kdePackages.libplasma: fix build nondeterminism Cherry-pick https://invent.kde.org/plasma/libplasma/-/merge_requests/1406 for wider testing Fixes #458839 --- pkgs/kde/plasma/libplasma/default.nix | 5 +++ .../plasma/libplasma/rb-extracomponents.patch | 37 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 pkgs/kde/plasma/libplasma/rb-extracomponents.patch diff --git a/pkgs/kde/plasma/libplasma/default.nix b/pkgs/kde/plasma/libplasma/default.nix index f13240876725..453c9d328f9e 100644 --- a/pkgs/kde/plasma/libplasma/default.nix +++ b/pkgs/kde/plasma/libplasma/default.nix @@ -8,6 +8,11 @@ mkKdeDerivation { pname = "libplasma"; + patches = [ + # https://invent.kde.org/plasma/libplasma/-/merge_requests/1406 + ./rb-extracomponents.patch + ]; + extraNativeBuildInputs = [ pkg-config ]; extraBuildInputs = [ diff --git a/pkgs/kde/plasma/libplasma/rb-extracomponents.patch b/pkgs/kde/plasma/libplasma/rb-extracomponents.patch new file mode 100644 index 000000000000..393a4df780f0 --- /dev/null +++ b/pkgs/kde/plasma/libplasma/rb-extracomponents.patch @@ -0,0 +1,37 @@ +commit 49d9faf0b11b3957d36c21f90b9f34933f507438 +Author: Arnout Engelen +Date: Sun Dec 14 10:43:57 2025 +0100 + + reproducible builds: make qml dependencies explicit + + Similar to https://qt-project.atlassian.net/browse/QTBUG-137440 + + To fix https://bugs.kde.org/show_bug.cgi?id=512868 + + I'll admit I don't quite know what I'm doing here, I'm mostly guessing and mimicking, but it does seem to remove the nondeterminism :) + +diff --git a/src/declarativeimports/plasmaextracomponents/CMakeLists.txt b/src/declarativeimports/plasmaextracomponents/CMakeLists.txt +index 1a7827819..a8e335af7 100644 +--- a/src/declarativeimports/plasmaextracomponents/CMakeLists.txt ++++ b/src/declarativeimports/plasmaextracomponents/CMakeLists.txt +@@ -1,4 +1,8 @@ +-ecm_add_qml_module(plasmaextracomponentsplugin VERSION 2.0 URI "org.kde.plasma.extras" GENERATE_PLUGIN_SOURCE) ++ecm_add_qml_module(plasmaextracomponentsplugin URI "org.kde.plasma.extras" ++ VERSION 2.0 ++ GENERATE_PLUGIN_SOURCE ++ LIBRARIES org_kde_plasmacomponents3 ++) + + target_sources(plasmaextracomponentsplugin PRIVATE + qmenu.cpp +@@ -42,7 +46,9 @@ target_link_libraries(plasmaextracomponentsplugin PRIVATE + Qt6::Qml + Qt6::Widgets + KF6::WidgetsAddons +- Plasma::Plasma) ++ Plasma::Plasma ++ org_kde_plasmacomponents3 ++) + + ecm_finalize_qml_module(plasmaextracomponentsplugin DESTINATION ${KDE_INSTALL_QMLDIR}) +