1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 hatch-requirements-txt,
7 mockupdb,
8 pymongo,
9}:
10
11buildPythonPackage rec {
12 pname = "motor";
13 version = "3.7.1";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "mongodb";
18 repo = "motor";
19 tag = version;
20 hash = "sha256-ul2GKzSiAewwGEuCpQQ61h3cqrJikaJeKs5KlX+aAjo=";
21 };
22
23 build-system = [
24 hatchling
25 hatch-requirements-txt
26 ];
27
28 pythonRelaxDeps = [ "pymongo" ];
29
30 dependencies = [ pymongo ];
31
32 nativeCheckInputs = [ mockupdb ];
33
34 # network connections
35 doCheck = false;
36
37 pythonImportsCheck = [ "motor" ];
38
39 meta = {
40 description = "Non-blocking MongoDB driver for Tornado or asyncio";
41 license = lib.licenses.asl20;
42 homepage = "https://github.com/mongodb/motor";
43 changelog = "https://github.com/mongodb/motor/releases/tag/${src.tag}";
44 maintainers = with lib.maintainers; [ globin ];
45 };
46}