about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/rocm-modules/6/hip-common/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/rocm-modules/6/hip-common/default.nix')
-rw-r--r--nixpkgs/pkgs/development/rocm-modules/6/hip-common/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/rocm-modules/6/hip-common/default.nix b/nixpkgs/pkgs/development/rocm-modules/6/hip-common/default.nix
new file mode 100644
index 000000000000..8b0a4fc5add2
--- /dev/null
+++ b/nixpkgs/pkgs/development/rocm-modules/6/hip-common/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, rocmUpdateScript
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "hip-common";
+  version = "6.0.2";
+
+  src = fetchFromGitHub {
+    owner = "ROCm";
+    repo = "HIP";
+    rev = "rocm-${finalAttrs.version}";
+    hash = "sha256-51u3By0R4LKoWiklNacFP6HILL845jxpN6FD7rQB+zQ=";
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    mv * $out
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = rocmUpdateScript {
+    name = finalAttrs.pname;
+    owner = finalAttrs.src.owner;
+    repo = finalAttrs.src.repo;
+  };
+
+  meta = with lib; {
+    description = "C++ Heterogeneous-Compute Interface for Portability";
+    homepage = "https://github.com/ROCm/HIP";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ lovesegfault ] ++ teams.rocm.members;
+    platforms = platforms.linux;
+    broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
+  };
+})