1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, torch
6}:
7
8buildPythonPackage rec {
9 pname = "lion-pytorch";
10 version = "0.1.2";
11 format = "setuptools";
12 disabled = pythonOlder "3.6";
13
14 src = fetchFromGitHub {
15 owner = "lucidrains";
16 repo = "lion-pytorch";
17 rev = "refs/tags/${version}";
18 hash = "sha256-9hdpRJvCpv3PeC7f0IXpHt6i+e6LiT0QUl5jeDGelQE=";
19 };
20
21 propagatedBuildInputs = [ torch ];
22
23 pythonImportsCheck = [ "lion_pytorch" ];
24 doCheck = false; # no tests currently
25
26 meta = with lib; {
27 description = "Optimizer tuned by Google Brain using genetic algorithms";
28 homepage = "https://github.com/lucidrains/lion-pytorch";
29 license = licenses.mit;
30 maintainers = with maintainers; [ bcdarwin ];
31 };
32}