Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 70 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 setuptools-scm, 7 interegular, 8 cloudpickle, 9 datasets, 10 diskcache, 11 joblib, 12 jsonschema, 13 pyairports, 14 pycountry, 15 pydantic, 16 lark, 17 nest-asyncio, 18 numba, 19 scipy, 20 torch, 21 transformers, 22}: 23 24buildPythonPackage rec { 25 pname = "outlines"; 26 version = "0.0.46"; 27 pyproject = true; 28 29 src = fetchFromGitHub { 30 owner = "outlines-dev"; 31 repo = pname; 32 rev = "refs/tags/${version}"; 33 hash = "sha256-6VH9BcMRVRf2xvLcK3GNA1pGgAOs95UOlFQ6KxHXwKo="; 34 }; 35 36 nativeBuildInputs = [ 37 setuptools 38 setuptools-scm 39 ]; 40 41 propagatedBuildInputs = [ 42 interegular 43 cloudpickle 44 datasets 45 diskcache 46 joblib 47 jsonschema 48 pydantic 49 lark 50 nest-asyncio 51 numba 52 scipy 53 torch 54 transformers 55 pycountry 56 pyairports 57 ]; 58 59 checkPhase = '' 60 export HOME=$(mktemp -d) 61 python3 -c 'import outlines' 62 ''; 63 64 meta = with lib; { 65 description = "Structured text generation"; 66 homepage = "https://github.com/outlines-dev/outlines"; 67 license = licenses.asl20; 68 maintainers = with maintainers; [ lach ]; 69 }; 70}