push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,132 @@
{
lib,
stdenv,
fetchFromGitHub,
rocmUpdateScript,
cmake,
rocm-cmake,
git,
rocm-comgr,
rocm-runtime,
hwdata,
texliveSmall,
doxygen,
graphviz,
writableTmpDirAsHomeHook,
buildDocs ? true,
}:
let
latex = lib.optionalAttrs buildDocs (
texliveSmall.withPackages (
ps: with ps; [
changepage
latexmk
varwidth
multirow
hanging
adjustbox
collectbox
stackengine
enumitem
alphalph
wasysym
sectsty
tocloft
newunicodechar
etoc
helvetic
wasy
courier
# FIXME: The following packages are used in the Doxygen table
# workaround, can be removed once
# https://github.com/doxygen/doxygen/issues/11634 is fixed, depending
# on what the fix is
tabularray
ninecolors
codehigh
catchfile
environ
]
)
);
in
stdenv.mkDerivation (finalAttrs: {
pname = "rocdbgapi";
version = "6.4.3";
outputs = [
"out"
]
++ lib.optionals buildDocs [
"doc"
];
src = fetchFromGitHub {
owner = "ROCm";
repo = "ROCdbgapi";
rev = "rocm-${finalAttrs.version}";
hash = "sha256-Rr8+SNeFps0rjk4Jn2+rFmtRJfL42l0tNOz13oZQy+I=";
};
# FIXME: remove once https://github.com/doxygen/doxygen/issues/11634 is resolved
# Applies workaround based on what was suggested in
# https://github.com/doxygen/doxygen/issues/11634#issuecomment-3027000655,
# but rewritten to use the `tabularray` LaTeX package. Unfortunately,
# verbatim code snippets in the documentation are not formatted very nicely
# with this workaround.
postPatch = ''
substituteInPlace doc/Doxyfile.in --replace 'LATEX_EXTRA_STYLESHEET =' 'LATEX_EXTRA_STYLESHEET = ${./override_doxygen_tables.sty}'
'';
nativeBuildInputs = [
cmake
rocm-cmake
git
]
++ lib.optionals buildDocs [
writableTmpDirAsHomeHook
latex
doxygen
graphviz
];
buildInputs = [
rocm-comgr
rocm-runtime
hwdata
];
cmakeFlags = [
"-DPCI_IDS_PATH=${hwdata}/share/hwdata"
# 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"
];
# Unfortunately, it seems like we have to call make on this manually
postBuild = lib.optionalString buildDocs ''
make -j$NIX_BUILD_CORES doc
'';
postInstall = lib.optionalString buildDocs ''
mv $out/share/html/amd-dbgapi $doc/share/doc/amd-dbgapi/html
rmdir $out/share/html
'';
passthru.updateScript = rocmUpdateScript {
name = finalAttrs.pname;
inherit (finalAttrs.src) owner;
inherit (finalAttrs.src) repo;
};
meta = with lib; {
description = "Debugger support for control of execution and inspection state";
homepage = "https://github.com/ROCm/ROCdbgapi";
license = with licenses; [ mit ];
teams = [ teams.rocm ];
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,89 @@
\NeedsTeXFormat{LaTeX2e}
% Packages used by this style file
\RequirePackage{doxygen}
\RequirePackage{tabularray}
\UseTblrLibrary{varwidth}
\RequirePackage{codehigh}
\RequirePackage{environ}
% Used by parameter lists
\renewenvironment{DoxyParams}[2][]{%
\par%
\ifthenelse{\equal{#1}{}}%
{\begin{longtblr}[l]{rowhead=1,measure=vbox,colspec={|X[-1,l]|X[-1,l]|}}}% name + description
{\ifthenelse{\equal{#1}{1}}%
{\begin{longtblr}[l]{rowhead=1,measure=vbox,colspec={|X[-1,l]|X[-1,l]|X[-1,l]|}}}% in/out + name + desc
{\begin{longtblr}[l]{rowhead=1,measure=vbox,colspec={|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}}% in/out + type + name + desc
}
\SetCell[c=2]{l} \hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2 \\[1ex]%
\hline%
}{%
\end{longtblr}%
\vspace{6pt}%
}
% Used for fields of simple structs
\renewenvironment{DoxyFields}[1]{%
\par%
\begin{longtblr}[l]{rowhead=1,measure=vbox,colspec={|X[-1,r]|X[-1,l]|X[-1,l]|}}%
\SetCell[c=3]{l} \hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1 \\[1ex]%
\hline%
}{%
\end{longtblr}%
\vspace{6pt}%
}
% Used for fields simple class style enums
\renewenvironment{DoxyEnumFields}[2][]{%
\par%
\ifthenelse{\equal{#1}{2}}%
{\begin{longtblr}[l]{rowhead=1,measure=vbox,colspec={|X[-1,r]|X[-1,l]|}}}%
{\begin{longtblr}[l]{rowhead=1,measure=vbox,colspec={|X[-1,l]|X[-1,r]|X[-1,l]|}}}% with init value
\SetCell[c=2]{l} \hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2 \\[1ex]%
\hline%
}{%
\end{longtblr}%
\vspace{6pt}%
}
% Used by return value lists
\renewenvironment{DoxyRetVals}[1]{%
\par%
\begin{longtblr}[l]{rowhead=1,measure=vbox,colspec={|X[-1,r]|X[-1,l]|}}%
\SetCell[c=2]{l} \hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1 \\[1ex]%
\hline%
}{%
\end{longtblr}%
\vspace{6pt}%
}
% Used by exception lists
\renewenvironment{DoxyExceptions}[1]{%
\par%
\begin{longtblr}[l]{rowhead=1,measure=vbox,colspec={|l[-1,r]|l[-1,l]|}}%
\SetCell[c=2]{l} \hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1 \\[1ex]%
\hline%
}{%
\end{longtblr}%
\vspace{6pt}%
}
% Used by template parameter lists
\renewenvironment{DoxyTemplParams}[1]{%
\par%
\begin{longtblr}[l]{rowhead=1,measure=vbox,colspec={|X[-1,r]|X[-1,l]|}}%
\SetCell[c=2]{l} \hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1 \\[1ex]%
\hline%
}{%
\end{longtblr}%
\vspace{6pt}%
}
% NOTE: this is not a perfect workaround, and known to loose linebreaks, repeated spaces, etc
\RenewEnviron{DoxyVerb}{%
\par%
\footnotesize%
\ExpandArgs{o}\fakeverb{\BODY}%
\normalsize%
}