From ed49b855e01692cdee70d97c721b8925a95ce1ac Mon Sep 17 00:00:00 2001 From: didier amyot Date: Mon, 14 Oct 2024 15:14:20 -0400 Subject: [PATCH] Added lapx --- flake.nix | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index d21b27f..558e22d 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,41 @@ let pkgs = nixpkgs.legacyPackages.${system}; pythonPackages = pkgs.python312Packages; + + lapx = pkgs.python3Packages.buildPythonPackage rec { + version = "0.5.11"; + pname = "lapx"; + pyproject = true; + src = pkgs.fetchFromGitHub { + owner = "rathaROG"; + repo = "lapx"; + rev = "be6f998e7cbe8746f75d9743a9de168d3788998f"; + hash = "sha256-7TUorvC/h9myQ+ZMOPABfqXx4D0mKYB1meszhpIeWWs="; + fetchSubmodules = true; + }; + + propagatedBuildInputs = + [ pythonPackages.numpy pythonPackages.cython ]; + + nativeBuildInputs = [ + pythonPackages.setuptools + pythonPackages.setuptools-scm + pythonPackages.cython + ]; + + meta = with pkgs.lib; { + description = '' + THOP offers an intuitive API to profile PyTorch models + by calculating the number of MACs and parameters. This + functionality is crucial for assessing the computational + efficiency and memory footprint of deep learning models. + ''; + homepage = "https://github.com/rathaROG/lapx"; + license = pkgs.lib.licenses.mit; + maintainers = with maintainers; [ ]; + }; + }; + ultralytics-thop = pkgs.python3Packages.buildPythonPackage rec { version = "2.0.9"; pname = "ultralytics-htop"; @@ -92,7 +127,7 @@ }; }; - env = pkgs.python312.withPackages (ps: [ ultralytics ]); + env = pkgs.python312.withPackages (ps: [ lapx ]); in { packages = {