1{
2 aiosqlite,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch2,
6 flask,
7 flit-core,
8 lib,
9 pytestCheckHook,
10 sqlalchemy,
11}:
12
13buildPythonPackage rec {
14 pname = "flask-sqlalchemy-lite";
15 version = "0.1.0";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "pallets-eco";
20 repo = "flask-sqlalchemy-lite";
21 tag = version;
22 hash = "sha256-LpdPp5Gp74DSJqD1DJqwNeaMKdN5pEAUkxnKGYZcVis=";
23 };
24
25 patches = [
26 # fix python3.13 compat
27 (fetchpatch2 {
28 url = "https://github.com/pallets-eco/flask-sqlalchemy-lite/commit/b4117beaa6caa0a5945d6e3451db8b80dc4cc8cf.patch?full_index=1";
29 hash = "sha256-zCeUWB3iuKqco030pULaRpRsIOpSRz9+VYxI/RQhIyw=";
30 })
31 ];
32
33 build-system = [ flit-core ];
34
35 dependencies = [
36 flask
37 sqlalchemy
38 ]
39 ++ flask.optional-dependencies.async
40 ++ sqlalchemy.optional-dependencies.asyncio;
41
42 pythonImportsCheck = [ "flask_sqlalchemy_lite" ];
43
44 nativeCheckInputs = [
45 aiosqlite
46 pytestCheckHook
47 ];
48
49 meta = {
50 changelog = "https://github.com/pallets-eco/flask-sqlalchemy-lite/blob/${src.rev}/CHANGES.md";
51 description = "Integrate SQLAlchemy with Flask";
52 homepage = "https://github.com/pallets-eco/flask-sqlalchemy-lite";
53 license = lib.licenses.mit;
54 maintainers = with lib.maintainers; [ dotlambda ];
55 };
56}