Files
nixpkgs/pkgs/development/rocm-modules/6/rocprofiler-register/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

87 lines
2.0 KiB
Nix

{
lib,
stdenv,
rocm-runtime,
rocprofiler,
numactl,
libpciaccess,
libxml2,
elfutils,
fetchFromGitHub,
rocmUpdateScript,
cmake,
clang,
clr,
python3Packages,
gpuTargets ? clr.gpuTargets,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "rocprofiler-register";
version = "6.4.3";
src = fetchFromGitHub {
owner = "ROCm";
repo = "rocprofiler-register";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-HaN4XMHuCRDfKOpfuZ2SkOEQfAZKouh6luqbtATUYm0=";
fetchSubmodules = true;
};
# vendored glog is too old and breaks on CMake 4, gets bumped in ROCm 7.0
postPatch = ''
substituteInPlace external/glog/cmake/GetCacheVariables.cmake \
--replace-fail "(VERSION 3.3)" "(VERSION 3.5)"
'';
nativeBuildInputs = [
cmake
clang
clr
];
# TODO(@LunNova): use system fmt&glog once upstream fixes flag to not vendor
buildInputs = [
numactl
libpciaccess
libxml2
elfutils
rocm-runtime
rocprofiler.rocmtoolkit-merged
python3Packages.lxml
python3Packages.cppheaderparser
python3Packages.pyyaml
python3Packages.barectf
python3Packages.pandas
];
cmakeFlags = [
"-DCMAKE_MODULE_PATH=${clr}/lib/cmake/hip"
"-DHIP_ROOT_DIR=${clr}"
"-DGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}"
"-DBUILD_TEST=OFF"
"-DROCPROFILER_BUILD_TESTS=0"
"-DROCPROFILER_BUILD_SAMPLES=0"
# Manually define CMAKE_INSTALL_<DIR>
# See: https://github.com/NixOS/nixpkgs/pull/197838
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
];
passthru.updateScript = rocmUpdateScript {
name = "rocprofiler-register";
inherit (finalAttrs.src) owner;
inherit (finalAttrs.src) repo;
};
meta = with lib; {
description = "Profiling with perf-counters and derived metrics";
homepage = "https://github.com/ROCm/rocprofiler";
license = with licenses; [ mit ]; # mitx11
teams = [ teams.rocm ];
platforms = platforms.linux;
};
})