nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 80 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 rocm-runtime, 5 rocprofiler, 6 numactl, 7 libpciaccess, 8 libxml2, 9 elfutils, 10 fetchFromGitHub, 11 rocmUpdateScript, 12 cmake, 13 clang, 14 clr, 15 python3Packages, 16 gpuTargets ? clr.gpuTargets, 17}: 18 19stdenv.mkDerivation (finalAttrs: { 20 pname = "rocprofiler-register"; 21 version = "7.1.1"; 22 23 src = fetchFromGitHub { 24 owner = "ROCm"; 25 repo = "rocprofiler-register"; 26 rev = "rocm-${finalAttrs.version}"; 27 hash = "sha256-XlBz5rDMvnPxyCiqpEpIUWzbHJ1BbMzeCJTrP5kKf+w="; 28 fetchSubmodules = true; 29 }; 30 31 nativeBuildInputs = [ 32 cmake 33 clang 34 clr 35 ]; 36 37 # TODO(@LunNova): use system fmt&glog once upstream fixes flag to not vendor 38 buildInputs = [ 39 numactl 40 libpciaccess 41 libxml2 42 elfutils 43 rocm-runtime 44 45 rocprofiler.rocmtoolkit-merged 46 47 python3Packages.lxml 48 python3Packages.cppheaderparser 49 python3Packages.pyyaml 50 python3Packages.barectf 51 python3Packages.pandas 52 ]; 53 cmakeFlags = [ 54 "-DCMAKE_MODULE_PATH=${clr}/lib/cmake/hip" 55 "-DHIP_ROOT_DIR=${clr}" 56 "-DGPU_TARGETS=${lib.concatStringsSep ";" gpuTargets}" 57 "-DBUILD_TEST=OFF" 58 "-DROCPROFILER_BUILD_TESTS=0" 59 "-DROCPROFILER_BUILD_SAMPLES=0" 60 # Manually define CMAKE_INSTALL_<DIR> 61 # See: https://github.com/NixOS/nixpkgs/pull/197838 62 "-DCMAKE_INSTALL_BINDIR=bin" 63 "-DCMAKE_INSTALL_LIBDIR=lib" 64 "-DCMAKE_INSTALL_INCLUDEDIR=include" 65 ]; 66 67 passthru.updateScript = rocmUpdateScript { 68 name = "rocprofiler-register"; 69 inherit (finalAttrs.src) owner; 70 inherit (finalAttrs.src) repo; 71 }; 72 73 meta = { 74 description = "Profiling with perf-counters and derived metrics"; 75 homepage = "https://github.com/ROCm/rocprofiler"; 76 license = with lib.licenses; [ mit ]; # mitx11 77 teams = [ lib.teams.rocm ]; 78 platforms = lib.platforms.linux; 79 }; 80})