tt-flake/pkgs/smi/default.nix

64 lines
1 KiB
Nix
Raw Normal View History

2024-10-01 18:41:35 +00:00
{
pkgs,
pyluwen,
tools-common,
}:
2024-01-31 05:20:40 +00:00
with pkgs.python3Packages;
buildPythonPackage rec {
pname = "tt-smi";
2025-01-29 01:53:16 +00:00
version = "3.0.5";
2024-01-31 05:20:40 +00:00
src = pkgs.fetchFromGitHub {
owner = "tenstorrent";
repo = "tt-smi";
2025-01-29 01:53:16 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-+Dw6F9aupe4VTWQFiNWGKMDOTmxwCW2bHuDQxWxluUc=";
2024-01-31 05:20:40 +00:00
};
format = "pyproject";
2024-10-01 18:41:35 +00:00
patches = [
# TODO: Still needed? Builds without.
#./log.patch
2024-10-01 18:41:35 +00:00
];
2024-01-31 05:20:40 +00:00
nativeBuildInputs = [ pythonRelaxDepsHook ];
2024-10-01 20:24:52 +00:00
pythonRelaxDeps = [
"black"
"distro"
"elasticsearch"
"rich"
"textual"
"pre-commit"
"importlib-resources"
];
2024-10-01 18:41:35 +00:00
propagatedBuildInputs = [
setuptools
requests
black
distro
elasticsearch
jsons
pydantic
psutil
pyyaml
pyluwen
importlib-resources
pkgs.pre-commit
tools-common
2025-01-29 18:06:14 +00:00
tools-common.textual
2024-10-01 18:41:35 +00:00
];
dontUsePytestCheck = true; # no tests
2025-01-29 17:41:49 +00:00
installCheckPhase = ''
output=$($out/bin/tt-smi || true)
echo "tt-smi output: $output"
echo $output | grep -q "No Tenstorrent driver detected"
'';
2024-01-31 05:20:40 +00:00
}