Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 36 lines 992 B view raw
1{ stdenv, buildPythonPackage, fetchPypi, fetchpatch 2, cython, pytest, pytestrunner, hypothesis }: 3 4buildPythonPackage rec { 5 pname = "datrie"; 6 version = "0.7.1"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"; 11 }; 12 13 patches = [ 14 # fix tests against recent hypothesis 15 (fetchpatch { 16 url = "https://github.com/pytries/datrie/commit/9b24b4c02783cdb703ac3f6c6d7d881db93166e0.diff"; 17 sha256 = "1ql7jcf57q3x3fcbddl26y9kmnbnj2dv6ga8mwq94l4a3213j2iy"; 18 }) 19 ]; 20 21 nativeBuildInputs = [ cython ]; 22 buildInputs = [ pytest pytestrunner hypothesis ]; 23 24 # recompile pxd and pyx for python37 25 # https://github.com/pytries/datrie/issues/52 26 preBuild = '' 27 ./update_c.sh 28 ''; 29 30 meta = with stdenv.lib; { 31 description = "Super-fast, efficiently stored Trie for Python"; 32 homepage = "https://github.com/kmike/datrie"; 33 license = licenses.lgpl2; 34 maintainers = with maintainers; [ lewo ]; 35 }; 36}