about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/outlines/default.nix
blob: 23ee7852f43beae16cee1b84171c20c172a5c430 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, setuptools-scm
, interegular
, cloudpickle
, diskcache
, joblib
, jsonschema
, pydantic
, lark
, nest-asyncio
, numba
, scipy
, torch
, transformers
}:

buildPythonPackage rec {
  pname = "outlines";
  version = "0.0.34";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "outlines-dev";
    repo = pname;
    rev = "refs/tags/${version}";
    hash = "sha256-iIlthrhmCm3n0PwUSa1n7CL04sDc1Cs+rVboPY4nH78=";
  };

  nativeBuildInputs = [
    setuptools
    setuptools-scm
  ];

  propagatedBuildInputs = [
    interegular
    cloudpickle
    diskcache
    joblib
    jsonschema
    pydantic
    lark
    nest-asyncio
    numba
    scipy
    torch
    transformers
  ];

  pythonImportsCheck = [
    "outlines"
  ];

  meta = with lib; {
    description = "Structured text generation";
    homepage = "https://github.com/outlines-dev/outlines";
    license = licenses.asl20;
    maintainers = with maintainers; [ lach ];
  };
}