2018-10-17 05:52:48 +01:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pytest
|
2019-01-05 10:54:27 +00:00
|
|
|
, fetchpatch
|
|
|
|
, glibcLocales
|
2018-10-17 05:52:48 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "netaddr";
|
|
|
|
version = "0.7.19";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "38aeec7cdd035081d3a4c306394b19d677623bf76fa0913f6695127c7753aefd";
|
|
|
|
};
|
|
|
|
|
|
|
|
LC_ALL = "en_US.UTF-8";
|
2019-01-05 10:54:27 +00:00
|
|
|
checkInputs = [ glibcLocales pytest ];
|
2018-10-17 05:52:48 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2018-11-27 06:25:51 +00:00
|
|
|
# fails on python3.7: https://github.com/drkjam/netaddr/issues/182
|
|
|
|
py.test \
|
|
|
|
-k 'not test_ip_splitter_remove_prefix_larger_than_input_range' \
|
|
|
|
netaddr/tests
|
2018-10-17 05:52:48 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
2019-01-05 10:54:27 +00:00
|
|
|
(fetchpatch {
|
2020-04-01 02:11:51 +01:00
|
|
|
url = "https://github.com/drkjam/netaddr/commit/2ab73f10be7069c9412e853d2d0caf29bd624012.patch";
|
2018-10-17 05:52:48 +01:00
|
|
|
sha256 = "0s1cdn9v5alpviabhcjmzc0m2pnpq9dh2fnnk2x96dnry1pshg39";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/drkjam/netaddr/";
|
2018-10-17 05:52:48 +01:00
|
|
|
description = "A network address manipulation library for Python";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|