Files
nixpkgs/pkgs/development/python-modules/python-redis-lock/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

47 lines
1.0 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, redis
, pytestCheckHook
, process-tests
, pkgs
, withDjango ? false, django-redis
}:
buildPythonPackage rec {
pname = "python-redis-lock";
version = "4.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Sr0Lz0kTasrWZye/VIbdJJQHjKVeSe+mk/eUB3MZCRo=";
};
propagatedBuildInputs = [
redis
] ++ lib.optional withDjango django-redis;
nativeCheckInputs = [
pytestCheckHook
process-tests
pkgs.redis
];
disabledTests = [
# https://github.com/ionelmc/python-redis-lock/issues/86
"test_no_overlap2"
] ++ lib.optionals stdenv.isDarwin [
# fail on Darwin because it defaults to multiprocessing `spawn`
"test_reset_signalizes"
"test_reset_all_signalizes"
];
meta = with lib; {
homepage = "https://github.com/ionelmc/python-redis-lock";
license = licenses.bsd2;
description = "Lock context manager implemented via redis SETNX/BLPOP";
maintainers = with maintainers; [ vanschelven ];
};
}