2019-12-29 18:06:14 +00:00
|
|
|
{ lib
|
2022-01-08 11:34:34 +00:00
|
|
|
, aiomysql
|
|
|
|
, aiosqlite
|
|
|
|
, asyncpg
|
2019-12-29 18:06:14 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, databases
|
2022-01-08 11:34:34 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2019-12-29 18:06:14 +00:00
|
|
|
, typesystem
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "orm";
|
2022-01-08 11:34:34 +00:00
|
|
|
version = "0.3.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2019-12-29 18:06:14 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "encode";
|
|
|
|
repo = "orm";
|
|
|
|
rev = version;
|
2022-01-08 11:34:34 +00:00
|
|
|
hash = "sha256-nlKEWdqttFnjBnXutlxTy9oILqFzKHKKPJpTtCUbJ5k=";
|
2019-12-29 18:06:14 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-01-08 11:34:34 +00:00
|
|
|
aiomysql
|
|
|
|
aiosqlite
|
|
|
|
asyncpg
|
2019-12-29 18:06:14 +00:00
|
|
|
databases
|
|
|
|
typesystem
|
|
|
|
];
|
|
|
|
|
2022-01-08 11:34:34 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "typesystem==0.3.1" "typesystem"
|
|
|
|
'';
|
2019-12-29 18:06:14 +00:00
|
|
|
|
2022-01-08 11:34:34 +00:00
|
|
|
# Tests require databases
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"orm"
|
|
|
|
];
|
2019-12-29 18:06:14 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An async ORM";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/encode/orm";
|
2019-12-29 18:06:14 +00:00
|
|
|
license = licenses.bsd3;
|
2022-01-08 11:34:34 +00:00
|
|
|
maintainers = with maintainers; [ costrouc ];
|
2019-12-29 18:06:14 +00:00
|
|
|
};
|
|
|
|
}
|