Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 97 lines 1.9 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, aiofiles 5, asgi-csrf 6, click 7, click-default-group 8, janus 9, jinja2 10, hupper 11, mergedeep 12, pint 13, pluggy 14, python-baseconv 15, pyyaml 16, uvicorn 17# Check Inputs 18, pytestCheckHook 19, pytestrunner 20, pytest-asyncio 21, aiohttp 22, beautifulsoup4 23, asgiref 24, setuptools 25}: 26 27buildPythonPackage rec { 28 pname = "datasette"; 29 version = "0.46"; 30 31 src = fetchFromGitHub { 32 owner = "simonw"; 33 repo = "datasette"; 34 rev = version; 35 sha256 = "0g4dfq5ykifa9628cb4i7gvx98p8hvb99gzfxk3bkvq1v9p4kcqq"; 36 }; 37 38 nativeBuildInputs = [ pytestrunner ]; 39 40 propagatedBuildInputs = [ 41 aiofiles 42 asgi-csrf 43 click 44 click-default-group 45 janus 46 jinja2 47 hupper 48 mergedeep 49 pint 50 pluggy 51 python-baseconv 52 pyyaml 53 uvicorn 54 setuptools 55 ]; 56 57 checkInputs = [ 58 pytestCheckHook 59 pytest-asyncio 60 aiohttp 61 beautifulsoup4 62 asgiref 63 ]; 64 65 postConfigure = '' 66 substituteInPlace setup.py \ 67 --replace "click~=7.1.1" "click" \ 68 --replace "click-default-group~=1.2.2" "click-default-group" \ 69 --replace "hupper~=1.9" "hupper" \ 70 --replace "pint~=0.9" "pint" \ 71 --replace "pluggy~=0.13.0" "pluggy" \ 72 --replace "uvicorn~=0.11" "uvicorn" \ 73 --replace "PyYAML~=5.3" "PyYAML" 74 ''; 75 76 # test_html is very slow 77 # test_black fails on darwin 78 dontUseSetuptoolsCheck = true; 79 pytestFlagsArray = [ 80 "--ignore=tests/test_html.py" 81 "--ignore=tests/test_docs.py" 82 "--ignore=tests/test_black.py" 83 ]; 84 disabledTests = [ 85 "facet" 86 "_invalid_database" # checks error message when connecting to invalid database 87 ]; 88 pythonImportsCheck = [ "datasette" ]; 89 90 meta = with lib; { 91 description = "An instant JSON API for your SQLite databases"; 92 homepage = "https://github.com/simonw/datasette"; 93 license = licenses.asl20; 94 maintainers = [ maintainers.costrouc ]; 95 }; 96 97}