nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 callPackage,
6 dpkg,
7 rocm-core,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "hsa-amd-aqlprofile-bin";
12 version = "6.3.3";
13
14 src =
15 let
16 inherit (finalAttrs) version;
17 patch = rocm-core.ROCM_LIBPATCH_VERSION;
18 majorMinor = lib.versions.majorMinor version;
19 poolVersion = if majorMinor + ".0" == version then majorMinor else version;
20 incremental = "74";
21 osRelease = "22.04";
22 in
23 fetchurl {
24 url = "https://repo.radeon.com/rocm/apt/${poolVersion}/pool/main/h/hsa-amd-aqlprofile/hsa-amd-aqlprofile_1.0.0.${patch}-${incremental}~${osRelease}_amd64.deb";
25 hash = "sha256-Lo6gU9ywkujtsKvnOAwL3L8qQNPwjjm0Pm4OyzoUYao=";
26 };
27
28 nativeBuildInputs = [ dpkg ];
29 dontPatch = true;
30 dontConfigure = true;
31 dontBuild = true;
32
33 installPhase = ''
34 runHook preInstall
35
36 mkdir -p $out
37 cp -a opt/rocm-${finalAttrs.version}*/* $out
38 chmod +x $out/lib/libhsa-amd-aqlprofile64.so.1.*
39 chmod +x $out/lib/hsa-amd-aqlprofile/librocprofv2_att.so
40
41 runHook postInstall
42 '';
43
44 passthru.updateScript = (callPackage ./update.nix { }) { inherit (finalAttrs) version; };
45
46 meta = with lib; {
47 description = "AQLPROFILE library for AMD HSA runtime API extension support";
48 homepage = "https://rocm.docs.amd.com/en/latest/";
49 license = with licenses; [ unfree ];
50 teams = [ teams.rocm ];
51 platforms = platforms.linux;
52 };
53})