nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hatch-fancy-pypi-readme,
6 hatch-vcs,
7 hatchling,
8 numpy,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 version = "3.4.0";
14 pname = "opt-einsum";
15 pyproject = true;
16
17 src = fetchPypi {
18 pname = "opt_einsum";
19 inherit version;
20 hash = "sha256-lspy8biG0UgkE0h4NJgZTFd/owqPqsEIWGsU8bpEc6w=";
21 };
22
23 build-system = [
24 hatch-fancy-pypi-readme
25 hatch-vcs
26 hatchling
27 ];
28
29 dependencies = [ numpy ];
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "opt_einsum" ];
34
35 meta = {
36 description = "Optimizing NumPy's einsum function with order optimization and GPU support";
37 homepage = "https://github.com/dgasmith/opt_einsum";
38 license = lib.licenses.mit;
39 maintainers = with lib.maintainers; [ teh ];
40 };
41}