diff --git a/pkgs/development/libraries/qt-6/modules/qtdeclarative/default.nix b/pkgs/development/libraries/qt-6/modules/qtdeclarative/default.nix index fe554c46e2a35..fed828ae7b0d2 100644 --- a/pkgs/development/libraries/qt-6/modules/qtdeclarative/default.nix +++ b/pkgs/development/libraries/qt-6/modules/qtdeclarative/default.nix @@ -10,6 +10,7 @@ lib, pkgsBuildBuild, replaceVars, + fetchpatch2, }: qtModule { @@ -28,16 +29,24 @@ qtModule { darwin.sigtool ]; - patches = [ - # invalidates qml caches created from nix applications at different - # store paths and disallows saving caches of bare qml files in the store. - (replaceVars ./invalidate-caches-from-mismatched-store-paths.patch { - nixStore = builtins.storeDir; - nixStoreLength = builtins.toString ((builtins.stringLength builtins.storeDir) + 1); # trailing / - }) - # add version specific QML import path - ./use-versioned-import-path.patch - ]; + patches = + [ + # invalidates qml caches created from nix applications at different + # store paths and disallows saving caches of bare qml files in the store. + (replaceVars ./invalidate-caches-from-mismatched-store-paths.patch { + nixStore = builtins.storeDir; + nixStoreLength = builtins.toString ((builtins.stringLength builtins.storeDir) + 1); # trailing / + }) + # add version specific QML import path + ./use-versioned-import-path.patch + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # The build attempts to sign qmltestrunner, which may already be signed, causing it to fail unless forced. + (fetchpatch2 { + url = "https://invent.kde.org/qt/qt/qtdeclarative/-/commit/8effbbcefd8cae27cd5da07b4ffe3aa86dad83bf.diff"; + hash = "sha256-wKrKXdr1ddshpRVIZZ/dsn87wjPXSaoUvXT9edlPtzA="; + }) + ]; preConfigure = let