2022-12-19 13:27:53 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rocmUpdateScript
|
|
|
|
, cmake
|
2023-10-02 03:05:32 +02:00
|
|
|
, clr
|
2022-12-19 13:27:53 +01:00
|
|
|
, git
|
|
|
|
, rocdbgapi
|
|
|
|
, elfutils
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "rocr-debug-agent";
|
2024-02-10 18:59:55 +01:00
|
|
|
version = "6.0.2";
|
2022-12-19 13:27:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-12-17 12:41:00 +01:00
|
|
|
owner = "ROCm";
|
2022-12-19 13:27:53 +01:00
|
|
|
repo = "rocr_debug_agent";
|
|
|
|
rev = "rocm-${finalAttrs.version}";
|
2024-02-10 18:59:55 +01:00
|
|
|
hash = "sha256-8Q800T7mwBy8/rujVNyCQ0ZpZ9uPKKk+Sv9ibpWou/8=";
|
2022-12-19 13:27:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2023-10-02 03:05:32 +02:00
|
|
|
clr
|
2022-12-19 13:27:53 +01:00
|
|
|
git
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
rocdbgapi
|
|
|
|
elfutils
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2023-10-02 03:05:32 +02:00
|
|
|
"-DCMAKE_MODULE_PATH=${clr}/lib/cmake/hip"
|
|
|
|
"-DHIP_ROOT_DIR=${clr}"
|
|
|
|
"-DHIP_PATH=${clr}"
|
2022-12-19 13:27:53 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
# Weird install target
|
|
|
|
postInstall = ''
|
|
|
|
rm -rf $out/src
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.updateScript = rocmUpdateScript {
|
|
|
|
name = finalAttrs.pname;
|
|
|
|
owner = finalAttrs.src.owner;
|
|
|
|
repo = finalAttrs.src.repo;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library that provides some debugging functionality for ROCr";
|
2023-12-17 12:41:00 +01:00
|
|
|
homepage = "https://github.com/ROCm/rocr_debug_agent";
|
2022-12-19 13:27:53 +01:00
|
|
|
license = with licenses; [ ncsa ];
|
|
|
|
maintainers = teams.rocm.members;
|
|
|
|
platforms = platforms.linux;
|
2024-02-29 23:25:55 +01:00
|
|
|
broken = versions.minor finalAttrs.version != versions.minor stdenv.cc.version || versionAtLeast finalAttrs.version "7.0.0";
|
2022-12-19 13:27:53 +01:00
|
|
|
};
|
|
|
|
})
|