about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/default.nix')
-rw-r--r--nixpkgs/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/default.nix b/nixpkgs/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/default.nix
new file mode 100644
index 000000000000..b88485b5fa37
--- /dev/null
+++ b/nixpkgs/pkgs/development/rocm-modules/6/hsa-amd-aqlprofile-bin/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, stdenv
+, fetchurl
+, callPackage
+, dpkg
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "hsa-amd-aqlprofile-bin";
+  version = "6.0.2";
+
+  src = let
+    version = finalAttrs.version;
+    dotless = builtins.replaceStrings ["."] ["0"] version;
+    incremental = "115";
+    osRelease = "22.04";
+  in fetchurl {
+    url = "https://repo.radeon.com/rocm/apt/${version}/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.${dotless}.${dotless}-${incremental}~${osRelease}_amd64.deb";
+    hash = "sha256-0XeKUKaof5pSMS/UgLwumBDBYgyH/pCex9jViUKENXY=";
+  };
+
+  nativeBuildInputs = [ dpkg ];
+  dontPatch = true;
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out
+    cp -a opt/rocm-${finalAttrs.version}/* $out
+    chmod +x $out/lib/libhsa-amd-aqlprofile64.so.1.*
+    chmod +x $out/lib/hsa-amd-aqlprofile/librocprofv2_att.so
+
+    runHook postInstall
+  '';
+
+  passthru.updateScript = (callPackage ./update.nix { }) { inherit (finalAttrs) version; };
+
+  meta = with lib; {
+    description = "AQLPROFILE library for AMD HSA runtime API extension support";
+    homepage = "https://rocm.docs.amd.com/en/latest/";
+    license = with licenses; [ unfree ];
+    maintainers = teams.rocm.members;
+    platforms = platforms.linux;
+    broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
+  };
+})