depot/third_party/nixpkgs/pkgs/development/rocm-modules/5/hsa-amd-aqlprofile-bin/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

45 lines
1.2 KiB
Nix

{ lib
, stdenv
, fetchurl
, dpkg
}:
let
prefix = "hsa-amd-aqlprofile";
version = "5.7.0";
major = lib.versions.major version;
minor = lib.versions.minor version;
patch = lib.versions.patch version;
magic = lib.strings.concatStrings (lib.strings.intersperse "0" (lib.versions.splitVersion version));
in stdenv.mkDerivation (finalAttrs: {
inherit version;
pname = "${prefix}-bin";
src = fetchurl {
url = "https://repo.radeon.com/rocm/apt/${major}.${minor}/pool/main/h/${prefix}/${prefix}_1.0.0.${magic}.${magic}-63~22.04_amd64.deb";
hash = "sha256-FQ25eXkhnvOmcf0sGW3GYu9kZj69bVvZrh0jVx/G/kI=";
};
nativeBuildInputs = [ dpkg ];
dontPatch = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out
cp -a opt/rocm-${version}/* $out
runHook postInstall
'';
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;
};
})