1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 setuptools-scm,
7 interegular,
8 cloudpickle,
9 diskcache,
10 joblib,
11 jsonschema,
12 pydantic,
13 lark,
14 nest-asyncio,
15 numba,
16 scipy,
17 torch,
18 transformers,
19}:
20
21buildPythonPackage rec {
22 pname = "outlines";
23 version = "0.0.45";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "outlines-dev";
28 repo = pname;
29 rev = "refs/tags/${version}";
30 hash = "sha256-VJ/q3NBNatBv3gsV637sciiOHdDJRnMlcisu5GRmWM0=";
31 };
32
33 nativeBuildInputs = [
34 setuptools
35 setuptools-scm
36 ];
37
38 propagatedBuildInputs = [
39 interegular
40 cloudpickle
41 diskcache
42 joblib
43 jsonschema
44 pydantic
45 lark
46 nest-asyncio
47 numba
48 scipy
49 torch
50 transformers
51 ];
52
53 pythonImportsCheck = [ "outlines" ];
54
55 meta = with lib; {
56 description = "Structured text generation";
57 homepage = "https://github.com/outlines-dev/outlines";
58 license = licenses.asl20;
59 maintainers = with maintainers; [ lach ];
60 # Missing dependencies since the last update
61 broken = true;
62 };
63}