Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, buildPythonPackage, fetchPypi, isPy3k, pytest, mock, brotli }: 2 3buildPythonPackage rec { 4 pname = "logbook"; 5 version = "1.5.3"; 6 7 src = fetchPypi { 8 pname = "Logbook"; 9 inherit version; 10 sha256 = "1s1gyfw621vid7qqvhddq6c3z2895ci4lq3g0r1swvpml2nm9x36"; 11 }; 12 13 nativeCheckInputs = [ pytest ] ++ lib.optionals (!isPy3k) [ mock ]; 14 15 propagatedBuildInputs = [ brotli ]; 16 17 checkPhase = '' 18 find tests -name \*.pyc -delete 19 py.test tests 20 ''; 21 22 # Some of the tests use localhost networking. 23 __darwinAllowLocalNetworking = true; 24 25 meta = { 26 homepage = "https://pythonhosted.org/Logbook/"; 27 description = "A logging replacement for Python"; 28 license = lib.licenses.bsd3; 29 }; 30}