nixpkgs/pkgs/development/python-modules/mongoengine/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

54 lines
1,009 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pymongo
, isPy27
, six
, blinker
, nose
, pillow
, coverage
}:
buildPythonPackage rec {
pname = "mongoengine";
version = "0.25.0";
disabled = isPy27;
src = fetchFromGitHub {
owner = "MongoEngine";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-2UPjyKJGiW8UfWgMu8WKZJ5l+p4vTR57GxMFC5amb4A=";
};
propagatedBuildInputs = [
pymongo
six
];
nativeCheckInputs = [
nose
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 = with lib; {
description = "MongoEngine is a Python Object-Document Mapper for working with MongoDB";
homepage = "http://mongoengine.org/";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}