From 751be5e78052a47fc4bcf2e9201916bca7b0c9f1 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sat, 20 Sep 2025 12:28:54 -0700 Subject: [PATCH] tt-system-tools: init at 1.4.0 --- pkgs/by-name/tt/tt-system-tools/package.nix | 51 +++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pkgs/by-name/tt/tt-system-tools/package.nix diff --git a/pkgs/by-name/tt/tt-system-tools/package.nix b/pkgs/by-name/tt/tt-system-tools/package.nix new file mode 100644 index 000000000000..f242fba017ff --- /dev/null +++ b/pkgs/by-name/tt/tt-system-tools/package.nix @@ -0,0 +1,51 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + makeWrapper, + # Remove "? null" once https://github.com/NixOS/nixpkgs/pull/444714 is merged + tt-smi ? null, + pstree, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "tt-system-tools"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "tenstorrent"; + repo = "tt-system-tools"; + tag = "v${finalAttrs.version}"; + hash = "sha256-ZtEs1XRho/EJShAV6+8Db2wxCK2QQBuNp+TRqb+ZiM4="; + }; + + nativeBuildInputs = [ + makeWrapper + ]; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + install -Dm755 tt-oops/tt-oops.sh $out/bin/tt-oops + wrapProgram "$out/bin/tt-oops" \ + --prefix PATH : ${ + lib.makeBinPath [ + tt-smi + pstree + ] + } + + runHook postInstall + ''; + + meta = { + description = "System tools for Tenstorrent cards"; + homepage = "https://github.com/tenstorrent/tt-system-tools"; + changelog = "https://github.com/tenstorrent/tt-system-tools/blob/${finalAttrs.src.tag}/debian/changelog"; + maintainers = with lib.maintainers; [ RossComputerGuy ]; + license = with lib.licenses; [ asl20 ]; + platforms = lib.platforms.linux; + }; +})