Files
nixpkgs/pkgs/development/python-modules/einops/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

64 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
jupyter,
nbconvert,
numpy,
parameterized,
pillow,
pytestCheckHook,
writableTmpDirAsHomeHook,
pythonOlder,
torch,
}:
buildPythonPackage rec {
pname = "einops";
version = "0.8.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "arogozhnikov";
repo = "einops";
tag = "v${version}";
hash = "sha256-J9m5LMOleHf2UziUbOtwf+DFpu/wBDcAyHUor4kqrR8=";
};
build-system = [ hatchling ];
nativeCheckInputs = [
writableTmpDirAsHomeHook
jupyter
nbconvert
numpy
parameterized
pillow
pytestCheckHook
torch
];
env.EINOPS_TEST_BACKENDS = "numpy";
pythonImportsCheck = [ "einops" ];
disabledTestPaths = [
# skip folder with notebook samples that depend on large packages
# or accelerator access and have been unreliable
"scripts/"
];
__darwinAllowLocalNetworking = true;
meta = {
changelog = "https://github.com/arogozhnikov/einops/releases/tag/${src.tag}";
description = "Flexible and powerful tensor operations for readable and reliable code";
homepage = "https://github.com/arogozhnikov/einops";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ yl3dy ];
};
}