nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hatchling,
6 hatch-requirements-txt,
7 setuptools,
8 dnspython,
9
10 # for passthru.tests
11 celery, # check-input only
12 flask-pymongo,
13 kombu, # check-input only
14 mongoengine,
15 motor,
16 pymongo-inmemory,
17}:
18
19buildPythonPackage rec {
20 pname = "pymongo";
21 version = "4.16.0";
22 pyproject = true;
23
24 src = fetchPypi {
25 inherit version;
26 pname = "pymongo";
27 hash = "sha256-i6hAUGX24lim+HL+YteXoo84OhIXjHFTwB7QToRcYAw=";
28 };
29
30 build-system = [
31 hatchling
32 hatch-requirements-txt
33 setuptools
34 ];
35
36 dependencies = [ dnspython ];
37
38 # Tests call a running mongodb instance
39 doCheck = false;
40
41 pythonImportsCheck = [ "pymongo" ];
42
43 passthru.tests = {
44 inherit
45 celery
46 flask-pymongo
47 kombu
48 mongoengine
49 motor
50 pymongo-inmemory
51 ;
52 };
53
54 meta = {
55 description = "Python driver for MongoDB";
56 homepage = "https://github.com/mongodb/mongo-python-driver";
57 license = lib.licenses.asl20;
58 maintainers = [ ];
59 };
60}