diff --git a/pkgs/development/python-modules/pyluwen/default.nix b/pkgs/development/python-modules/pyluwen/default.nix new file mode 100644 index 000000000000..329e5ecb898a --- /dev/null +++ b/pkgs/development/python-modules/pyluwen/default.nix @@ -0,0 +1,53 @@ +{ + lib, + buildPythonPackage, + runCommand, + fetchFromGitHub, + rustPlatform, + maturin, + protobuf_30, +}: +buildPythonPackage rec { + pname = "pyluwen"; + version = "0.7.11"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tenstorrent"; + repo = "luwen"; + tag = "v${version}"; + hash = "sha256-eQpKEeuy0mVrmu8ssAOWBcXi7zutStu+RbZOEF/IJ98="; + }; + + cargoDeps = rustPlatform.fetchCargoVendor { + inherit src; + hash = "sha256-INzF8ORkrmPQMJbGSNm5QkfMOgE+HJ3taU1EZ9i+HJg="; + }; + + sourceRoot = "${src.name}/crates/${pname}"; + + prePatch = '' + chmod -R u+w ../../ + cd ../../ + ''; + + postPatch = '' + cd ../$sourceRoot + cp --no-preserve=ownership,mode ../../Cargo.lock . + ''; + + nativeBuildInputs = with rustPlatform; [ + cargoSetupHook + maturinBuildHook + protobuf_30 + ]; + + build-system = [ maturin ]; + + meta = { + description = "Tenstorrent system interface library"; + homepage = "https://github.com/tenstorrent/luwen"; + 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 new file mode 100644 index 000000000000..f7f9d7a27cca --- /dev/null +++ b/pkgs/development/python-modules/tt-flash/default.nix @@ -0,0 +1,44 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + fetchpatch, + setuptools, + pyyaml, + tabulate, + pyluwen, + tt-tools-common, +}: +buildPythonPackage rec { + pname = "tt-flash"; + version = "3.3.3"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tenstorrent"; + repo = "tt-flash"; + tag = "v${version}"; + hash = "sha256-edWogH/HZZlGwyiqGbj6vunNxhsCr/+3LzmFgFGzjck="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + tabulate + pyyaml + pyluwen + tt-tools-common + ]; + + pythonImportsCheck = [ "tt_flash" ]; + pythonRelaxDeps = [ "pyyaml" ]; + + meta = { + description = "Tenstorrent Firmware Update Utility"; + homepage = "https://tenstorrent.com"; + maintainers = with lib.maintainers; [ RossComputerGuy ]; + license = with lib.licenses; [ asl20 ]; + }; +} diff --git a/pkgs/development/python-modules/tt-tools-common/default.nix b/pkgs/development/python-modules/tt-tools-common/default.nix new file mode 100644 index 000000000000..a6e69f9bc319 --- /dev/null +++ b/pkgs/development/python-modules/tt-tools-common/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchpatch, + fetchFromGitHub, + setuptools, + distro, + elasticsearch, + psutil, + pyyaml, + rich, + textual, + requests, + tqdm, + pydantic, +}: +buildPythonPackage rec { + pname = "tt-tools-common"; + version = "1.4.25"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tenstorrent"; + repo = "tt-tools-common"; + tag = "v${version}"; + hash = "sha256-phal8KxfQqsGAIcKQTlSPZB04J158jZYlyamZr45vdU="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + distro + elasticsearch + psutil + pyyaml + rich + textual + requests + tqdm + pydantic + ]; + + meta = { + description = "Helper library for common utilities shared across Tentorrent tools"; + homepage = "https://github.com/tenstorrent/tt-tools-common"; + maintainers = with lib.maintainers; [ RossComputerGuy ]; + license = with lib.licenses; [ asl20 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e49a820de7b6..c8d9acf244c7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13318,6 +13318,8 @@ self: super: with self; { pylutron-caseta = callPackage ../development/python-modules/pylutron-caseta { }; + pyluwen = callPackage ../development/python-modules/pyluwen { }; + pylxd = callPackage ../development/python-modules/pylxd { }; pylyrics = callPackage ../development/python-modules/pylyrics { }; @@ -18648,6 +18650,10 @@ self: super: with self; { tsplib95 = callPackage ../development/python-modules/tsplib95 { }; + tt-flash = callPackage ../development/python-modules/tt-flash { }; + + tt-tools-common = callPackage ../development/python-modules/tt-tools-common { }; + ttach = callPackage ../development/python-modules/ttach { }; ttfautohint-py = callPackage ../development/python-modules/ttfautohint-py { };