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