at master 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 black, 5 jinja2, 6 dirty-equals, 7 fastapi, 8 fetchFromGitHub, 9 fetchpatch, 10 pdm-backend, 11 pydantic, 12 pytest-asyncio, 13 pytestCheckHook, 14 pythonOlder, 15 sqlalchemy, 16}: 17 18buildPythonPackage rec { 19 pname = "sqlmodel"; 20 version = "0.0.24"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchFromGitHub { 26 owner = "tiangolo"; 27 repo = "sqlmodel"; 28 tag = version; 29 hash = "sha256-RKihR3UJLuBYSHK79pcxIx/hT0nCkqQO8zBrq4AWaYM="; 30 }; 31 32 patches = [ 33 (fetchpatch { 34 # https://github.com/tiangolo/sqlmodel/pull/969 35 name = "passthru-environ-variables.patch"; 36 url = "https://github.com/tiangolo/sqlmodel/pull/969/commits/42d33049e9e4182b78914ad41d1e3d30125126ba.patch"; 37 hash = "sha256-dPuFCFUnmTpduxn45tE8XUP0Jlwjwmwe+zFaKSganOg="; 38 }) 39 ]; 40 41 build-system = [ pdm-backend ]; 42 43 dependencies = [ 44 pydantic 45 sqlalchemy 46 ]; 47 48 nativeCheckInputs = [ 49 black 50 jinja2 51 dirty-equals 52 fastapi 53 pytest-asyncio 54 pytestCheckHook 55 ]; 56 57 pythonImportsCheck = [ "sqlmodel" ]; 58 59 disabledTests = [ 60 # AssertionError: assert 'enum_field VARCHAR(1) 61 "test_sqlite_ddl_sql" 62 ]; 63 64 disabledTestPaths = [ 65 # Coverage 66 "docs_src/tutorial/" 67 "tests/test_tutorial/" 68 ]; 69 70 meta = with lib; { 71 description = "Module to work with SQL databases"; 72 homepage = "https://github.com/tiangolo/sqlmodel"; 73 changelog = "https://github.com/tiangolo/sqlmodel/releases/tag/${version}"; 74 license = licenses.mit; 75 maintainers = with maintainers; [ fab ]; 76 }; 77}