From 984fc6f787715e9213ba0324884dea672f97a79b Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sat, 11 Oct 2025 22:32:56 -0700 Subject: [PATCH 1/2] tt-smi: move to by-name --- .../tt/tt-smi/package.nix} | 29 ++++++++----------- pkgs/top-level/python-packages.nix | 2 -- 2 files changed, 12 insertions(+), 19 deletions(-) rename pkgs/{development/python-modules/tt-smi/default.nix => by-name/tt/tt-smi/package.nix} (73%) diff --git a/pkgs/development/python-modules/tt-smi/default.nix b/pkgs/by-name/tt/tt-smi/package.nix similarity index 73% rename from pkgs/development/python-modules/tt-smi/default.nix rename to pkgs/by-name/tt/tt-smi/package.nix index c58ae346e466..fad569cf70db 100644 --- a/pkgs/development/python-modules/tt-smi/default.nix +++ b/pkgs/by-name/tt/tt-smi/package.nix @@ -1,21 +1,11 @@ { lib, - buildPythonPackage, + python3Packages, fetchFromGitHub, - pythonOlder, - setuptools, - distro, - elasticsearch, - pydantic, - pyluwen, - rich, - textual, pre-commit, - importlib-resources, - tt-tools-common, - tomli, + versionCheckHook, }: -buildPythonPackage rec { +python3Packages.buildPythonApplication rec { pname = "tt-smi"; version = "3.0.30"; pyproject = true; @@ -27,13 +17,11 @@ buildPythonPackage rec { hash = "sha256-C6CfcS0H3rFew/Y1uhmzICdFp1UYU7H9h3YPeAKlcbE="; }; - disabled = pythonOlder "3.13"; - - build-system = [ + build-system = with python3Packages; [ setuptools ]; - dependencies = [ + dependencies = with python3Packages; [ distro elasticsearch pydantic @@ -47,10 +35,17 @@ buildPythonPackage rec { tomli ]; + nativeCheckInputs = [ + versionCheckHook + ]; + # Fails due to having no tests dontUsePytestCheck = true; + versionCheckProgramArg = "--version"; + meta = { + mainProgram = "tt-smi"; description = "Tenstorrent console based hardware information program"; homepage = "https://github.com/tenstorrent/tt-smi"; maintainers = with lib.maintainers; [ RossComputerGuy ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 781d7cedb9bd..ecd3e21ae1a2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18851,8 +18851,6 @@ self: super: with self; { tt-flash = callPackage ../development/python-modules/tt-flash { }; - tt-smi = callPackage ../development/python-modules/tt-smi { }; - tt-tools-common = callPackage ../development/python-modules/tt-tools-common { }; ttach = callPackage ../development/python-modules/ttach { }; From 94451f7fdcedf54505c29a7cc9725d51608a023f Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sat, 11 Oct 2025 22:33:15 -0700 Subject: [PATCH 2/2] nixos/tenstorrent: use tt-smi from by-name --- nixos/modules/hardware/tenstorrent.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/hardware/tenstorrent.nix b/nixos/modules/hardware/tenstorrent.nix index 30840021b714..c042c600a86b 100644 --- a/nixos/modules/hardware/tenstorrent.nix +++ b/nixos/modules/hardware/tenstorrent.nix @@ -24,7 +24,7 @@ in ]; environment.systemPackages = with pkgs; [ - python3Packages.tt-smi + tt-smi tt-system-tools ]; };