Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 959 B view raw
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4, pytest 5, fetchpatch 6, glibcLocales 7}: 8 9buildPythonPackage rec { 10 pname = "netaddr"; 11 version = "0.7.19"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd"; 16 }; 17 18 LC_ALL = "en_US.UTF-8"; 19 checkInputs = [ glibcLocales pytest ]; 20 21 checkPhase = '' 22 # fails on python3.7: https://github.com/drkjam/netaddr/issues/182 23 py.test \ 24 -k 'not test_ip_splitter_remove_prefix_larger_than_input_range' \ 25 netaddr/tests 26 ''; 27 28 patches = [ 29 (fetchpatch { 30 url = https://github.com/drkjam/netaddr/commit/2ab73f10be7069c9412e853d2d0caf29bd624012.patch; 31 sha256 = "0s1cdn9v5alpviabhcjmzc0m2pnpq9dh2fnnk2x96dnry1pshg39"; 32 }) 33 ]; 34 35 meta = with stdenv.lib; { 36 homepage = https://github.com/drkjam/netaddr/; 37 description = "A network address manipulation library for Python"; 38 license = licenses.mit; 39 }; 40 41}