nixpkgs/pkgs/development/python-modules/mongoengine/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

56 lines
1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pymongo,
isPy27,
six,
blinker,
pytestCheckHook,
pillow,
coverage,
}:
buildPythonPackage rec {
pname = "mongoengine";
version = "0.29.1";
format = "setuptools";
disabled = isPy27;
src = fetchFromGitHub {
owner = "MongoEngine";
repo = "mongoengine";
tag = "v${version}";
hash = "sha256-trWCKmCa+q+qtzF0HKCZMnko1cvvpwJvczLFuKtB83E=";
};
propagatedBuildInputs = [
pymongo
six
];
nativeCheckInputs = [
pytestCheckHook
pillow
coverage
blinker
];
postPatch = ''
substituteInPlace setup.py \
--replace "coverage==4.2" "coverage" \
--replace "pymongo>=3.4,<=4.0" "pymongo"
'';
# tests require mongodb running in background
doCheck = false;
pythonImportsCheck = [ "mongoengine" ];
meta = {
description = "MongoEngine is a Python Object-Document Mapper for working with MongoDB";
homepage = "http://mongoengine.org/";
license = lib.licenses.mit;
maintainers = [ ];
};
}