1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 setuptools-scm, 7 airportsdata, 8 interegular, 9 cloudpickle, 10 datasets, 11 diskcache, 12 jinja2, 13 jsonschema, 14 numpy, 15 outlines-core, 16 pycountry, 17 pydantic, 18 lark, 19 nest-asyncio, 20 referencing, 21 requests, 22 torch, 23 transformers, 24}: 25 26buildPythonPackage rec { 27 pname = "outlines"; 28 version = "0.1.13"; 29 pyproject = true; 30 31 src = fetchFromGitHub { 32 owner = "outlines-dev"; 33 repo = "outlines"; 34 tag = version; 35 hash = "sha256-HuJqLbBHyoyY5ChQQi+9ftvPjLuh63Guk2w6KSZxq6s="; 36 }; 37 38 build-system = [ 39 setuptools 40 setuptools-scm 41 ]; 42 43 dependencies = [ 44 airportsdata 45 interegular 46 cloudpickle 47 datasets 48 diskcache 49 jinja2 50 jsonschema 51 outlines-core 52 pydantic 53 lark 54 nest-asyncio 55 numpy 56 referencing 57 requests 58 torch 59 transformers 60 pycountry 61 ]; 62 63 checkPhase = '' 64 export HOME=$(mktemp -d) 65 python3 -c 'import outlines' 66 ''; 67 68 meta = with lib; { 69 description = "Structured text generation"; 70 homepage = "https://github.com/outlines-dev/outlines"; 71 license = licenses.asl20; 72 maintainers = with maintainers; [ lach ]; 73 }; 74}