Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.2 kB view raw
1{ stdenv, fetchPypi, buildPythonPackage, fetchFromGitHub, simplejson, redis, setproctitle, nose, pkgs }: 2 3let 4 5 # the requirements of `pyres` support Redis 3.x (due to a missing upper-bound), 6 # but it doesn't support Redis 3.x. 7 redis' = redis.overridePythonAttrs (old: rec { 8 pname = "redis"; 9 version = "2.10.6"; 10 src = fetchPypi { 11 inherit pname version; 12 sha256 = "03vcgklykny0g0wpvqmy8p6azi2s078317wgb2xjv5m2rs9sjb52"; 13 }; 14 }); 15 16in 17 18buildPythonPackage rec { 19 pname = "pyres"; 20 version = "1.5"; 21 22 # ps is used in Worker.worker_pids method 23 propagatedBuildInputs = [ simplejson setproctitle redis' pkgs.ps ]; 24 checkInputs = [ nose pkgs.redis ]; 25 26 # PyPI tarball doesn't contain tests so let's use GitHub 27 src = fetchFromGitHub { 28 owner = "binarydud"; 29 repo = pname; 30 rev = version; 31 sha256 = "1rkpv7gbjxl9h9g7kncmsrgmi77l7pgfq8d7dbnsr3ia2jmjqb8y"; 32 }; 33 34 checkPhase = '' 35 redis-server & 36 nosetests . --exclude test_worker_pids 37 ''; 38 39 meta = with stdenv.lib; { 40 description = "Python resque clone"; 41 homepage = https://github.com/binarydud/pyres; 42 license = licenses.mit; 43 maintainers = with maintainers; [ jluttine ]; 44 }; 45}