Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 38 lines 817 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, isPyPy 5, snappy 6, cffi 7, nose 8}: 9 10buildPythonPackage rec { 11 pname = "python-snappy"; 12 version = "0.5.4"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "d9c26532cfa510f45e8d135cde140e8a5603d3fb254cfec273ebc0ecf9f668e2"; 17 }; 18 19 buildInputs = [ snappy ]; 20 21 propagatedBuildInputs = lib.optional isPyPy cffi; 22 23 checkInputs = [ nose ]; 24 25 checkPhase = '' 26 rm -r snappy # prevent local snappy from being picked up 27 nosetests test_snappy.py 28 '' + lib.optionalString isPyPy '' 29 nosetests test_snappy_cffi.py 30 ''; 31 32 meta = with lib; { 33 description = "Python library for the snappy compression library from Google"; 34 homepage = https://github.com/andrix/python-snappy; 35 license = licenses.bsd3; 36 maintainers = [ maintainers.costrouc ]; 37 }; 38}