1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # Dependencies 7 setuptools, 8 click, 9 fastapi, 10 python-dotenv, 11 slowapi, 12 starlette, 13 tiktoken, 14 tomli, 15 uvicorn, 16 17 # Tests 18 httpx, 19 jinja2, 20 pytestCheckHook, 21 python-multipart, 22}: 23 24buildPythonPackage rec { 25 pname = "gitingest"; 26 version = "0.1.4"; 27 pyproject = true; 28 29 src = fetchFromGitHub { 30 owner = "cyclotruc"; 31 repo = "gitingest"; 32 tag = "v${version}"; 33 hash = "sha256-2zt4pYgj5fieYS74QCMA9Kw9FUNb13ZJB/tX7WkMQew="; 34 }; 35 36 build-system = [ 37 setuptools 38 ]; 39 40 pythonRelaxDeps = [ 41 "fastapi" 42 ]; 43 44 dependencies = [ 45 click 46 fastapi 47 python-dotenv 48 slowapi 49 starlette 50 tiktoken 51 tomli 52 uvicorn 53 ]; 54 55 pythonImportsCheck = [ 56 "gitingest" 57 ]; 58 59 nativeCheckInputs = [ 60 httpx 61 jinja2 62 pytestCheckHook 63 python-multipart 64 ]; 65 66 disabledTests = [ 67 # Tests require network 68 "test_cli_with_default_options" 69 "test_cli_with_options" 70 "test_run_ingest_query" 71 ]; 72 73 meta = { 74 changelog = "https://github.com/cyclotruc/gitingest/releases/tag/${src.tag}"; 75 description = "Replace 'hub' with 'ingest' in any github url to get a prompt-friendly extract of a codebase"; 76 homepage = "https://github.com/cyclotruc/gitingest"; 77 license = lib.licenses.mit; 78 maintainers = with lib.maintainers; [ drupol ]; 79 mainProgram = "gitingest"; 80 }; 81}