depot/third_party/nixpkgs/pkgs/development/python-modules/python-redis-lock/default.nix
Default email 58f8944c92 Project import generated by Copybara.
GitOrigin-RevId: 5aba0fe9766a7201a336249fd6cb76e0d7ba2faf
2020-09-24 23:45:31 -05:00

36 lines
774 B
Nix

{ stdenv
, buildPythonPackage
, fetchPypi
, redis
, pytest
, process-tests
, pkgs
, withDjango ? false, django_redis
}:
buildPythonPackage rec {
pname = "python-redis-lock";
version = "3.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "6c79b87f2fefcf47bbcebea56056d324e9d7971c9b98123b79590e08cbb0a8f7";
};
checkInputs = [ pytest process-tests pkgs.redis ];
checkPhase = ''
pytest tests/
'';
propagatedBuildInputs = [ redis ]
++ stdenv.lib.optional withDjango django_redis;
meta = with stdenv.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 ];
};
}