about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNeubauer, Sebastian <Sebastian.Neubauer@amd.com>2021-11-08 10:09:01 +0000
committerNeubauer, Sebastian <Sebastian.Neubauer@amd.com>2021-12-15 16:57:22 +0100
commit923ad46057ba955a3c0e37845494617754510890 (patch)
tree63776b3d712fdb921572f56ecf05af7a8d2bfc4d
parent66bdbb56e2ac0e69b657457dc0ffa29ab3fc7119 (diff)
rocclr: 4.3.1 → 4.5.2
rocclr cannot be built alone and needs to be distributed by source now.
-rw-r--r--pkgs/development/libraries/rocclr/default.nix41
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 11 insertions, 34 deletions
diff --git a/pkgs/development/libraries/rocclr/default.nix b/pkgs/development/libraries/rocclr/default.nix
index eed5b998ee7be..4d78209f14113 100644
--- a/pkgs/development/libraries/rocclr/default.nix
+++ b/pkgs/development/libraries/rocclr/default.nix
@@ -1,55 +1,34 @@
 { lib, stdenv
 , fetchFromGitHub
 , writeScript
-, cmake
-, rocm-cmake
-, clang
 , rocm-comgr
-, rocm-opencl-runtime
-, rocm-runtime
-, rocm-thunk
-, libelf
-, libglvnd
-, libX11
-, numactl
 }:
 
 stdenv.mkDerivation rec {
   pname = "rocclr";
-  version = "4.3.1";
+  version = "4.5.2";
 
   src = fetchFromGitHub {
     owner = "ROCm-Developer-Tools";
     repo = "ROCclr";
     rev = "rocm-${version}";
-    hash = "sha256-3lk7Zucoam+11gFBzg/TWQI1L8uAlxTrPz/mDwTwod4=";
+    hash = "sha256-fsQANBND/oDeC/+wmCH/aLlDTxPIi7Z/oN1HnNHHnm0=";
   };
 
-  nativeBuildInputs = [ cmake rocm-cmake ];
-
-  buildInputs = [ clang rocm-comgr rocm-runtime rocm-thunk ];
-
-  propagatedBuildInputs = [ libelf libglvnd libX11 numactl ];
-
   prePatch = ''
-    substituteInPlace CMakeLists.txt \
-      --replace 'set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ''${CMAKE_CURRENT_BINARY_DIR}/lib)' \
-        'set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ''${CMAKE_INSTALL_LIBDIR})'
     substituteInPlace device/comgrctx.cpp \
       --replace "libamd_comgr.so" "${rocm-comgr}/lib/libamd_comgr.so"
   '';
 
-  cmakeFlags = [
-    "-DOPENCL_DIR=${rocm-opencl-runtime.src}"
-  ];
+  buildPhase = "";
+
+  installPhase = ''
+    runHook preInstall
 
-  preFixup = ''
-    # Work around broken cmake files
-    ln -s $out/include/compiler/lib/include/* $out/include
-    ln -s $out/include/elf/elfio $out/include/elfio
+    mkdir -p $out
+    cp -r * $out/
 
-    substituteInPlace $out/lib/cmake/rocclr/ROCclrConfig.cmake \
-      --replace "/build/source/build" "$out"
+    runHook postInstall
   '';
 
   passthru.updateScript = writeScript "update.sh" ''
@@ -60,7 +39,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = with lib; {
-    description = "Radeon Open Compute common language runtime";
+    description = "Source package of the Radeon Open Compute common language runtime";
     homepage = "https://github.com/ROCm-Developer-Tools/ROCclr";
     license = licenses.mit;
     maintainers = with maintainers; [ lovesegfault ];
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 36a2f96455fcf..7b207867144e5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -12780,9 +12780,7 @@ with pkgs;
 
   rgxg = callPackage ../tools/text/rgxg { };
 
-  rocclr = callPackage ../development/libraries/rocclr {
-    inherit (llvmPackages_rocm) clang;
-  };
+  rocclr = callPackage ../development/libraries/rocclr { };
 
   hip = callPackage ../development/compilers/hip {
     inherit (llvmPackages_rocm) clang clang-unwrapped compiler-rt lld llvm;