diff --git a/pkgs/by-name/tt/tt-smi/package.nix b/pkgs/by-name/tt/tt-smi/package.nix index 9fced72b8bfdf..ca48a04b9c165 100644 --- a/pkgs/by-name/tt/tt-smi/package.nix +++ b/pkgs/by-name/tt/tt-smi/package.nix @@ -7,14 +7,15 @@ }: python3Packages.buildPythonApplication (finalAttrs: { pname = "tt-smi"; - version = "3.0.30"; + version = "5.0.1"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "tenstorrent"; repo = "tt-smi"; tag = "v${finalAttrs.version}"; - hash = "sha256-C6CfcS0H3rFew/Y1uhmzICdFp1UYU7H9h3YPeAKlcbE="; + hash = "sha256-hm3MCq4Mh6BQ9QJLG2csSmojVnEaxhy6f7wIvfn0EPI="; }; build-system = with python3Packages; [ @@ -46,6 +47,7 @@ python3Packages.buildPythonApplication (finalAttrs: { mainProgram = "tt-smi"; description = "Tenstorrent console based hardware information program"; homepage = "https://github.com/tenstorrent/tt-smi"; + changelog = "https://github.com/tenstorrent/tt-smi/blob/${finalAttrs.src.tag}/CHANGELOG.md"; maintainers = with lib.maintainers; [ RossComputerGuy ]; license = with lib.licenses; [ asl20 ]; }; diff --git a/pkgs/development/python-modules/pyluwen/default.nix b/pkgs/development/python-modules/pyluwen/default.nix index dad420df0e768..da3620d49289b 100644 --- a/pkgs/development/python-modules/pyluwen/default.nix +++ b/pkgs/development/python-modules/pyluwen/default.nix @@ -1,30 +1,31 @@ { lib, buildPythonPackage, - runCommand, fetchFromGitHub, rustPlatform, + maturin, protobuf_30, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pyluwen"; - version = "0.7.11"; + version = "0.8.5"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "tenstorrent"; repo = "luwen"; - tag = "v${version}"; - hash = "sha256-eQpKEeuy0mVrmu8ssAOWBcXi7zutStu+RbZOEF/IJ98="; + tag = "v${finalAttrs.version}"; + hash = "sha256-lY7cZ+8C0UEGGYxufl4Vi8g0L4AJFXaGqn7XE2ivTcQ="; }; cargoDeps = rustPlatform.fetchCargoVendor { - inherit src; - hash = "sha256-INzF8ORkrmPQMJbGSNm5QkfMOgE+HJ3taU1EZ9i+HJg="; + inherit (finalAttrs) pname version src; + hash = "sha256-QBGXbRiBk4WIQFopq1OccmUHgx5GzR/PKhMH4Ie+fyg="; }; - sourceRoot = "${src.name}/crates/${pname}"; + sourceRoot = "${finalAttrs.src.name}/bind/pyluwen"; prePatch = '' chmod -R u+w ../../ @@ -34,7 +35,7 @@ buildPythonPackage rec { postPatch = '' cd ../$sourceRoot cp --no-preserve=ownership,mode ../../Cargo.lock . - sed -i '0,/version = /{s/version = "*.*.*"/version = "${version}"/g}' Cargo.toml + sed -i '0,/version = /{s/version = "*.*.*"/version = "${finalAttrs.version}"/g}' Cargo.toml ''; nativeBuildInputs = with rustPlatform; [ @@ -48,7 +49,8 @@ buildPythonPackage rec { meta = { description = "Tenstorrent system interface library"; homepage = "https://github.com/tenstorrent/luwen"; + changelog = "https://github.com/tenstorrent/luwen/releases/tag/${finalAttrs.src.tag}"; maintainers = with lib.maintainers; [ RossComputerGuy ]; license = with lib.licenses; [ asl20 ]; }; -} +}) diff --git a/pkgs/development/python-modules/tt-flash/default.nix b/pkgs/development/python-modules/tt-flash/default.nix index 3d3503f5f5dad..01d57bb7d043a 100644 --- a/pkgs/development/python-modules/tt-flash/default.nix +++ b/pkgs/development/python-modules/tt-flash/default.nix @@ -2,29 +2,37 @@ lib, buildPythonPackage, fetchFromGitHub, - fetchpatch, + + # build-system setuptools, + + # dependencies pyyaml, tabulate, pyluwen, tt-tools-common, + + # tests + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "tt-flash"; - version = "3.6.0"; + version = "3.6.5"; pyproject = true; src = fetchFromGitHub { owner = "tenstorrent"; repo = "tt-flash"; - tag = "v${version}"; - hash = "sha256-io3+fNQWS1Gxb0L0HcQQocOT+ROjQUk4mw7xG3om7oU="; + tag = "v${finalAttrs.version}"; + hash = "sha256-WGcSjo+wc6aCJwzlXNieRTFSSKubEu/zqDULBEv2Krc="; }; build-system = [ setuptools ]; + # upstream pins ~all dependencies to an exact version + pythonRelaxDeps = true; dependencies = [ tabulate pyyaml @@ -33,12 +41,17 @@ buildPythonPackage rec { ]; pythonImportsCheck = [ "tt_flash" ]; - pythonRelaxDeps = [ "pyyaml" ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; meta = { description = "Tenstorrent Firmware Update Utility"; homepage = "https://tenstorrent.com"; + downloadPage = "https://github.com/tenstorrent/tt-flash"; + changelog = "https://github.com/tenstorrent/tt-flash/blob/${finalAttrs.src.tag}/CHANGELOG.md"; maintainers = with lib.maintainers; [ RossComputerGuy ]; license = with lib.licenses; [ asl20 ]; }; -} +}) diff --git a/pkgs/development/python-modules/tt-umd/default.nix b/pkgs/development/python-modules/tt-umd/default.nix new file mode 100644 index 0000000000000..33a1f9ea558ee --- /dev/null +++ b/pkgs/development/python-modules/tt-umd/default.nix @@ -0,0 +1,45 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + cmake, + nanobind, + ninja, + scikit-build-core, + setuptools, +}: + +buildPythonPackage (finalAttrs: { + pname = "tt-umd"; + version = "0.9.4"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "tenstorrent"; + repo = "tt-umd"; + tag = "v${finalAttrs.version}"; + hash = "sha256-B/Hj5m75pVvJLOWw26A3QZn848ym/63AxxWiWqfzUTU="; + }; + + build-system = [ + cmake + nanobind + ninja + scikit-build-core + setuptools + ]; + dontUseCmakeConfigure = true; + + pythonImportsCheck = [ "tt_umd" ]; + + meta = { + description = "User-Mode Driver for Tenstorrent hardware"; + homepage = "https://github.com/tenstorrent/tt-umd"; + changelog = "https://github.com/tenstorrent/tt-umd/blob/${finalAttrs.src.tag}/CHANGELOG"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e8558e3a9521c..e178b42c96d9f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -19907,6 +19907,8 @@ self: super: with self; { tt-tools-common = callPackage ../development/python-modules/tt-tools-common { }; + tt-umd = callPackage ../development/python-modules/tt-umd { }; + ttach = callPackage ../development/python-modules/ttach { }; ttfautohint-py = callPackage ../development/python-modules/ttfautohint-py { };