nixpkgs/pkgs/development/python-modules/torchinfo/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

51 lines
966 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, torch
, torchvision
}:
buildPythonPackage rec {
pname = "torchinfo";
version = "1.64";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "TylerYep";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-gcl8RxCD017FP4LtB60WVtOh7jg2Otv/vNd9hKneEAU=";
};
propagatedBuildInputs = [
torch
torchvision
];
nativeCheckInputs = [
pytestCheckHook
];
disabledTests = [
# Skip as it downloads pretrained weights (require network access)
"test_eval_order_doesnt_matter"
# AssertionError in output
"test_google"
];
pythonImportsCheck = [
"torchvision"
];
meta = with lib; {
description = "API to visualize pytorch models";
homepage = "https://github.com/TylerYep/torchinfo";
license = licenses.mit;
maintainers = with maintainers; [ petterstorvik ];
};
}