1{
2 lib,
3 buildPythonPackage,
4 einops,
5 fetchFromGitHub,
6 hatchling,
7 pytestCheckHook,
8 torch,
9}:
10
11buildPythonPackage rec {
12 pname = "hyper-connections";
13 version = "0.2.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "lucidrains";
18 repo = "hyper-connections";
19 tag = version;
20 hash = "sha256-9dMiyxzrZBlDxKeehXjoIjbzAkGSkAFxQZZX3LJJAig=";
21 };
22
23 build-system = [ hatchling ];
24
25 dependencies = [
26 einops
27 torch
28 ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [ "hyper_connections" ];
33
34 meta = {
35 description = "Module to make multiple residual streams";
36 homepage = "https://github.com/lucidrains/hyper-connections";
37 changelog = "https://github.com/lucidrains/hyper-connections/releases/tag/${src.tag}";
38 license = lib.licenses.mit;
39 maintainers = with lib.maintainers; [ fab ];
40 };
41}