Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, fetchPypi, buildPythonPackage, isPy3k, flask, blinker, twill }: 2 3buildPythonPackage rec { 4 pname = "Flask-Testing"; 5 version = "0.8.0"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "1rkkqgmrzmhpv6y1xysqh0ij03xniic8h631yvghksqwxd9vyjfq"; 10 }; 11 12 postPatch = '' 13 substituteInPlace setup.py --replace "twill==0.9.1" "twill" 14 ''; 15 16 propagatedBuildInputs = [ flask ]; 17 18 checkInputs = [ blinker ] ++ stdenv.lib.optionals (!isPy3k) [ twill ]; 19 20 # twill integration is outdated in Python 2, hence it the tests fails. 21 # Some of the tests use localhost networking on darwin. 22 doCheck = isPy3k && !stdenv.isDarwin; 23 24 pythonImportsCheck = [ "flask_testing" ]; 25 26 meta = with stdenv.lib; { 27 description = "Flask unittest integration."; 28 homepage = "https://pythonhosted.org/Flask-Testing/"; 29 license = licenses.bsd3; 30 maintainers = [ maintainers.mic92 ]; 31 }; 32}