Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 36 lines 774 B view raw
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4, redis 5, pytest 6, process-tests 7, pkgs 8, withDjango ? false, django_redis 9}: 10 11buildPythonPackage rec { 12 pname = "python-redis-lock"; 13 version = "3.4.0"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "8e3ef458b9424daf35d587e69b63416a0c55ac46303f3aaff1bab4fe5a8f1e92"; 18 }; 19 20 checkInputs = [ pytest process-tests pkgs.redis ]; 21 22 checkPhase = '' 23 pytest tests/ 24 ''; 25 26 propagatedBuildInputs = [ redis ] 27 ++ stdenv.lib.optional withDjango django_redis; 28 29 30 meta = with stdenv.lib; { 31 homepage = "https://github.com/ionelmc/python-redis-lock"; 32 license = licenses.bsd2; 33 description = "Lock context manager implemented via redis SETNX/BLPOP"; 34 maintainers = with maintainers; [ vanschelven ]; 35 }; 36}