2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pymongo
|
2020-10-16 20:44:37 +00:00
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
, six
|
|
|
|
, blinker
|
|
|
|
, nose
|
|
|
|
, pillow
|
|
|
|
, coverage
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mongoengine";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.27.0";
|
2020-10-16 20:44:37 +00:00
|
|
|
disabled = isPy27;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MongoEngine";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-UCd7RpsSNDKh3vgVRYrFYWYVLQuK7WI0n/Moukhq5dM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pymongo
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
nose
|
|
|
|
pillow
|
|
|
|
coverage
|
|
|
|
blinker
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2022-04-15 01:41:22 +00:00
|
|
|
--replace "coverage==4.2" "coverage" \
|
|
|
|
--replace "pymongo>=3.4,<=4.0" "pymongo"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# tests require mongodb running in background
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
pythonImportsCheck = [ "mongoengine" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "MongoEngine is a Python Object-Document Mapper for working with MongoDB";
|
|
|
|
homepage = "http://mongoengine.org/";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|