nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 113 lines 2.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 rocmUpdateScript, 6 cmake, 7 rocm-cmake, 8 rocm-comgr, 9 rocm-runtime, 10 hwdata, 11 texliveSmall, 12 doxygen, 13 graphviz, 14 writableTmpDirAsHomeHook, 15 buildDocs ? true, 16}: 17 18let 19 latex = lib.optionalAttrs buildDocs ( 20 texliveSmall.withPackages ( 21 ps: with ps; [ 22 changepage 23 latexmk 24 varwidth 25 multirow 26 hanging 27 adjustbox 28 collectbox 29 stackengine 30 enumitem 31 alphalph 32 wasysym 33 sectsty 34 tocloft 35 newunicodechar 36 etoc 37 helvetic 38 wasy 39 courier 40 tabularray 41 ltablex 42 ninecolors 43 xltabular 44 ] 45 ) 46 ); 47in 48stdenv.mkDerivation (finalAttrs: { 49 pname = "rocdbgapi"; 50 version = "7.1.1"; 51 52 outputs = [ 53 "out" 54 ] 55 ++ lib.optionals buildDocs [ 56 "doc" 57 ]; 58 59 buildFlags = lib.optionals buildDocs [ "doc" ]; 60 61 src = fetchFromGitHub { 62 owner = "ROCm"; 63 repo = "ROCdbgapi"; 64 rev = "rocm-${finalAttrs.version}"; 65 hash = "sha256-RwYZJPwGhNtSSvmSgy0AsNTc98cav0/u9jH5f93sB9M="; 66 }; 67 68 nativeBuildInputs = [ 69 cmake 70 rocm-cmake 71 ] 72 ++ lib.optionals buildDocs [ 73 writableTmpDirAsHomeHook 74 latex 75 doxygen 76 graphviz 77 ]; 78 79 buildInputs = [ 80 rocm-comgr 81 rocm-runtime 82 hwdata 83 ]; 84 85 cmakeFlags = [ 86 "-DPCI_IDS_PATH=${hwdata}/share/hwdata" 87 # Manually define CMAKE_INSTALL_<DIR> 88 # See: https://github.com/NixOS/nixpkgs/pull/197838 89 "-DCMAKE_INSTALL_BINDIR=bin" 90 "-DCMAKE_INSTALL_LIBDIR=lib" 91 "-DCMAKE_INSTALL_INCLUDEDIR=include" 92 ]; 93 94 postInstall = lib.optionalString buildDocs '' 95 mkdir -p $doc/share/doc/amd-dbgapi/ 96 mv $out/share/html/amd-dbgapi $doc/share/doc/amd-dbgapi/html 97 rmdir $out/share/html 98 ''; 99 100 passthru.updateScript = rocmUpdateScript { 101 name = finalAttrs.pname; 102 inherit (finalAttrs.src) owner; 103 inherit (finalAttrs.src) repo; 104 }; 105 106 meta = { 107 description = "Debugger support for control of execution and inspection state of AMD's GPU architectures"; 108 homepage = "https://github.com/ROCm/ROCdbgapi"; 109 license = with lib.licenses; [ mit ]; 110 teams = [ lib.teams.rocm ]; 111 platforms = lib.platforms.linux; 112 }; 113})