diff options
author | Someone Serge <sergei.kozlukov@aalto.fi> | 2024-01-17 00:33:54 +0000 |
---|---|---|
committer | Someone Serge <sergei.kozlukov@aalto.fi> | 2024-01-17 00:50:15 +0000 |
commit | 8ddc8e335530af3d1394fe323838ade3b0a7d2f6 (patch) | |
tree | 98f2c5f49af116d9ad213b825c0c878b3c29972b /pkgs/development/cuda-modules/cuda/overrides.nix | |
parent | b16942dfa8287ed5a4c24b18e5036c09687387d4 (diff) |
cudaPackages_12.nsight_systems: unbreak
Diffstat (limited to 'pkgs/development/cuda-modules/cuda/overrides.nix')
-rw-r--r-- | pkgs/development/cuda-modules/cuda/overrides.nix | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/pkgs/development/cuda-modules/cuda/overrides.nix b/pkgs/development/cuda-modules/cuda/overrides.nix index d1cd8b1d573c1..214d64a0f3df8 100644 --- a/pkgs/development/cuda-modules/cuda/overrides.nix +++ b/pkgs/development/cuda-modules/cuda/overrides.nix @@ -210,20 +210,64 @@ attrsets.filterAttrs (attr: _: (builtins.hasAttr attr prev)) { ); nsight_systems = prev.nsight_systems.overrideAttrs ( - prevAttrs: { - nativeBuildInputs = prevAttrs.nativeBuildInputs ++ [final.pkgs.qt5.wrapQtAppsHook]; + prevAttrs: + let + qt = if lib.versionOlder prevAttrs.version "2022.4.2.1" then final.pkgs.qt5 else final.pkgs.qt6; + qtwayland = + if lib.versions.major qt.qtbase.version == "5" then + lib.getBin qt.qtwayland + else + lib.getLib qt.qtwayland; + qtWaylandPlugins = "${qtwayland}/${qt.qtbase.qtPluginPrefix}"; + in + { + # An ad hoc replacement for + # https://github.com/ConnorBaker/cuda-redist-find-features/issues/11 + env.rmPatterns = toString [ + "nsight-systems/*/*/libQt*" + "nsight-systems/*/*/libstdc*" + "nsight-systems/*/*/libboost*" + "nsight-systems/*/*/lib{ssl,ssh,crypto}*" + "nsight-systems/*/*/lib{arrow,jpeg}*" + "nsight-systems/*/*/Mesa" + "nsight-systems/*/*/python/bin/python" + "nsight-systems/*/*/libexec" + "nsight-systems/*/*/Plugins" + ]; + postPatch = + prevAttrs.postPatch or "" + + '' + for path in $rmPatterns ; do + rm -r "$path" + done + ''; + nativeBuildInputs = prevAttrs.nativeBuildInputs ++ [ qt.wrapQtAppsHook ]; buildInputs = prevAttrs.buildInputs ++ [ + final.cuda_cudart.stubs final.pkgs.alsa-lib + # final.pkgs.boost170 # cudaPackages_11_4 + final.pkgs.boost178 final.pkgs.e2fsprogs + final.pkgs.gst_all_1.gst-plugins-base + final.pkgs.gst_all_1.gstreamer final.pkgs.nss final.pkgs.numactl final.pkgs.pulseaudio + final.pkgs.rdma-core + final.pkgs.ucx final.pkgs.wayland final.pkgs.xorg.libXcursor final.pkgs.xorg.libXdamage final.pkgs.xorg.libXrandr final.pkgs.xorg.libXtst + qt.qtbase + (qt.qtdeclarative or qt.full) + (qt.qtsvg or qt.full) + qtWaylandPlugins ]; + + # Require boost 1.70 deprecated in Nixpkgs + meta.broken = prevAttrs.meta.broken or false || lib.versionOlder final.cudaVersion "11.8"; } ); |