summary refs log tree commit diff
path: root/pkgs/development/libraries/rocm-thunk/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/rocm-thunk/default.nix')
-rw-r--r--pkgs/development/libraries/rocm-thunk/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/development/libraries/rocm-thunk/default.nix b/pkgs/development/libraries/rocm-thunk/default.nix
new file mode 100644
index 00000000000..c43f9b04b93
--- /dev/null
+++ b/pkgs/development/libraries/rocm-thunk/default.nix
@@ -0,0 +1,37 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, numactl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "rocm-thunk";
+  version = "3.7.0";
+
+  src = fetchFromGitHub {
+    owner = "RadeonOpenCompute";
+    repo = "ROCT-Thunk-Interface";
+    rev = "rocm-${version}";
+    sha256 = "05963lxip3175g4b7k45r94yayp9gcwl3fpma9g5mdkbrlbvwlvz";
+  };
+
+  preConfigure = ''
+    export cmakeFlags="$cmakeFlags "
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  buildInputs = [ numactl ];
+
+  postInstall = ''
+    cp -r $src/include $out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Radeon open compute thunk interface";
+    homepage = "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface";
+    license = with licenses; [ bsd2 mit ];
+    maintainers = with maintainers; [ danieldk ];
+  };
+}