2022-01-03 16:56:52 +00:00
|
|
|
{ lib
|
|
|
|
, aiomysql
|
2022-02-20 05:27:41 +00:00
|
|
|
, aiopg
|
2022-01-03 16:56:52 +00:00
|
|
|
, aiosqlite
|
2022-02-20 05:27:41 +00:00
|
|
|
, asyncpg
|
|
|
|
, buildPythonPackage
|
2022-01-03 16:56:52 +00:00
|
|
|
, cryptography
|
2022-02-20 05:27:41 +00:00
|
|
|
, databases
|
|
|
|
, fastapi
|
|
|
|
, fetchFromGitHub
|
2022-01-03 16:56:52 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, mysqlclient
|
2022-02-20 05:27:41 +00:00
|
|
|
, orjson
|
|
|
|
, poetry-core
|
|
|
|
, psycopg2
|
|
|
|
, pydantic
|
2022-01-03 16:56:52 +00:00
|
|
|
, pymysql
|
|
|
|
, pytest-asyncio
|
2022-02-20 05:27:41 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, sqlalchemy
|
|
|
|
, typing-extensions
|
2022-01-03 16:56:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ormar";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.10.24";
|
2022-01-03 16:56:52 +00:00
|
|
|
format = "pyproject";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "collerek";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-02-20 05:27:41 +00:00
|
|
|
hash = "sha256-zKugeGDcYDI4VKspJPWeZCBubTqMxxfOVQCuF4pC49E=";
|
2022-01-03 16:56:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiomysql
|
|
|
|
aiosqlite
|
2022-02-20 05:27:41 +00:00
|
|
|
asyncpg
|
2022-01-03 16:56:52 +00:00
|
|
|
cryptography
|
2022-02-20 05:27:41 +00:00
|
|
|
databases
|
2022-01-03 16:56:52 +00:00
|
|
|
orjson
|
2022-02-20 05:27:41 +00:00
|
|
|
psycopg2
|
|
|
|
pydantic
|
|
|
|
sqlalchemy
|
2022-01-03 16:56:52 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
typing-extensions
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aiomysql
|
|
|
|
aiopg
|
2022-02-20 05:27:41 +00:00
|
|
|
aiosqlite
|
2022-01-03 16:56:52 +00:00
|
|
|
asyncpg
|
2022-02-20 05:27:41 +00:00
|
|
|
fastapi
|
2022-01-03 16:56:52 +00:00
|
|
|
mysqlclient
|
2022-02-20 05:27:41 +00:00
|
|
|
psycopg2
|
2022-01-03 16:56:52 +00:00
|
|
|
pymysql
|
|
|
|
pytest-asyncio
|
2022-02-20 05:27:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'SQLAlchemy = ">=1.3.18,<=1.4.29"' 'SQLAlchemy = ">=1.3.18"' \
|
|
|
|
--replace 'databases = ">=0.3.2,!=0.5.0,!=0.5.1,!=0.5.2,!=0.5.3,<0.5.5"' 'databases = ">=0.5.5"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# TypeError: Object of type bytes is not JSON serializable
|
|
|
|
"test_bulk_operations_with_json"
|
2022-01-03 16:56:52 +00:00
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"ormar"
|
|
|
|
];
|
2022-01-03 16:56:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/collerek/ormar";
|
2022-02-20 05:27:41 +00:00
|
|
|
description = "Async ORM with fastapi in mind and pydantic validation";
|
2022-01-03 16:56:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ andreasfelix ];
|
|
|
|
};
|
|
|
|
}
|