nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 rocmUpdateScript,
6 cmake,
7 rocm-cmake,
8 rocm-runtime,
9 busybox,
10 python3,
11 gnugrep,
12}:
13
14stdenv.mkDerivation (finalAttrs: {
15 version = "7.1.1";
16 pname = "rocminfo";
17
18 src = fetchFromGitHub {
19 owner = "ROCm";
20 repo = "rocminfo";
21 rev = "rocm-${finalAttrs.version}";
22 sha256 = "sha256-SuW34m2ep69+dj1rb0vqfQcK83FBtjlMLqSMCUZltU4=";
23 };
24
25 strictDeps = true;
26
27 nativeBuildInputs = [
28 cmake
29 rocm-cmake
30 python3
31 ];
32
33 buildInputs = [ rocm-runtime ];
34 cmakeFlags = [ "-DROCRTST_BLD_TYPE=Release" ];
35
36 prePatch = ''
37 patchShebangs rocm_agent_enumerator
38 sed 's,lsmod | grep ,${busybox}/bin/lsmod | ${gnugrep}/bin/grep ,' -i rocminfo.cc
39 '';
40
41 passthru.updateScript = rocmUpdateScript {
42 name = finalAttrs.pname;
43 inherit (finalAttrs.src) owner;
44 inherit (finalAttrs.src) repo;
45 };
46
47 meta = {
48 description = "ROCm Application for Reporting System Info";
49 homepage = "https://github.com/ROCm/rocminfo";
50 license = lib.licenses.ncsa;
51 mainProgram = "rocminfo";
52 maintainers = with lib.maintainers; [ lovesegfault ];
53 teams = [ lib.teams.rocm ];
54 platforms = lib.platforms.linux;
55 };
56})