diff options
Diffstat (limited to 'pkgs/development/rocm-modules/6/clr/default.nix')
-rw-r--r-- | pkgs/development/rocm-modules/6/clr/default.nix | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/pkgs/development/rocm-modules/6/clr/default.nix b/pkgs/development/rocm-modules/6/clr/default.nix index 05acf86478d38..dedda194c8280 100644 --- a/pkgs/development/rocm-modules/6/clr/default.nix +++ b/pkgs/development/rocm-modules/6/clr/default.nix @@ -3,6 +3,7 @@ , callPackage , fetchFromGitHub , fetchpatch +, fetchurl , rocmUpdateScript , makeWrapper , cmake @@ -34,6 +35,16 @@ let "--set HSA_PATH ${rocm-runtime}" "--set ROCM_PATH $out" ]; + + # https://github.com/NixOS/nixpkgs/issues/305641 + # Not needed when 3.29.2 is in unstable + cmake' = cmake.overrideAttrs(old: rec { + version = "3.29.2"; + src = fetchurl { + url = "https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz"; + hash = "sha256-NttLaSaqt0G6bksuotmckZMiITIwi03IJNQSPLcwNS4="; + }; + }); in stdenv.mkDerivation (finalAttrs: { pname = "clr"; version = "6.0.2"; @@ -52,7 +63,7 @@ in stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ makeWrapper - cmake + cmake' perl python3Packages.python python3Packages.cppheaderparser @@ -100,6 +111,16 @@ in stdenv.mkDerivation (finalAttrs: { url = "https://github.com/ROCm/clr/commit/77c581a3ebd47b5e2908973b70adea66891159ee.patch"; hash = "sha256-auBedbd7rghlKav7A9V6l64J7VmtE9GizIdi5gWj+fs="; }) + (fetchpatch { + name = "extend-hip-isa-compatibility-check.patch"; + url = "https://salsa.debian.org/rocm-team/rocm-hipamd/-/raw/d6d20142c37e1dff820950b16ff8f0523241d935/debian/patches/0026-extend-hip-isa-compatibility-check.patch"; + hash = "sha256-eG0ALZZQLRzD7zJueJFhi2emontmYy6xx8Rsm346nQI="; + }) + (fetchpatch { + name = "improve-rocclr-isa-compatibility-check.patch"; + url = "https://salsa.debian.org/rocm-team/rocm-hipamd/-/raw/d6d20142c37e1dff820950b16ff8f0523241d935/debian/patches/0025-improve-rocclr-isa-compatibility-check.patch"; + hash = "sha256-8eowuRiOAdd9ucKv4Eg9FPU7c6367H3eP3fRAGfXc6Y="; + }) ]; postPatch = '' @@ -113,6 +134,10 @@ in stdenv.mkDerivation (finalAttrs: { substituteInPlace hipamd/src/hip_embed_pch.sh \ --replace "\''$LLVM_DIR/bin/clang" "${clang}/bin/clang" + + # https://lists.debian.org/debian-ai/2024/02/msg00178.html + substituteInPlace rocclr/utils/flags.hpp \ + --replace-fail "HIP_USE_RUNTIME_UNBUNDLER, false" "HIP_USE_RUNTIME_UNBUNDLER, true" ''; postInstall = '' |