diff --git a/pkgs/development/cuda-modules/cuda/overrides.nix b/pkgs/development/cuda-modules/cuda/overrides.nix index 1e72b3f1e5be5..d5c66bbddcc7e 100644 --- a/pkgs/development/cuda-modules/cuda/overrides.nix +++ b/pkgs/development/cuda-modules/cuda/overrides.nix @@ -220,12 +220,13 @@ attrsets.filterAttrs (attr: _: (builtins.hasAttr attr prev)) { else lib.getLib qt.qtwayland; qtWaylandPlugins = "${qtwayland}/${qt.qtbase.qtPluginPrefix}"; + qt6Packages = final.pkgs.qt6Packages; in { # An ad hoc replacement for # https://github.com/ConnorBaker/cuda-redist-find-features/issues/11 env.rmPatterns = toString [ - "nsight-systems/*/*/libQt*" + "nsight-systems/*/*/libQt6*" "nsight-systems/*/*/libstdc*" "nsight-systems/*/*/libboost*" "nsight-systems/*/*/lib{ssl,ssh,crypto}*" @@ -233,7 +234,6 @@ attrsets.filterAttrs (attr: _: (builtins.hasAttr attr prev)) { "nsight-systems/*/*/Mesa" "nsight-systems/*/*/python/bin/python" "nsight-systems/*/*/libexec" - "nsight-systems/*/*/Plugins" ]; postPatch = prevAttrs.postPatch or "" @@ -266,6 +266,10 @@ attrsets.filterAttrs (attr: _: (builtins.hasAttr attr prev)) { (qt.qtdeclarative or qt.full) (qt.qtsvg or qt.full) qtWaylandPlugins + qt6Packages.qtpositioning + qt6Packages.qtscxml + qt6Packages.qttools + qt6Packages.qtwebengine ]; postInstall = @@ -280,6 +284,16 @@ attrsets.filterAttrs (attr: _: (builtins.hasAttr attr prev)) { substituteInPlace $bin/bin/nsys $bin/bin/nsys-ui \ --replace-fail 'nsight-systems-#VERSION_RSPLIT#' nsight-systems/${versionString} + + for qtlib in $bin/nsight-systems/${versionString}/host-linux-x64/Plugins/*/libq*.so; do + qtdir=$(basename $(dirname $qtlib)) + filename=$(basename $qtlib) + for qtpkgdir in ${lib.concatMapStringsSep " " (x: qt6Packages.${x}) ["qtbase" "qtimageformats" "qtsvg" "qtwayland"]}; do + if [ -e $qtpkgdir/lib/qt-6/plugins/$qtdir/$filename ]; then + ln -snf $qtpkgdir/lib/qt-6/plugins/$qtdir/$filename $qtlib + fi + done + done ''; # Older releases require boost 1.70 deprecated in Nixpkgs