1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, glibcLocales
6, importlib-resources
7, pytestCheckHook
8}:
9
10buildPythonPackage rec {
11 pname = "netaddr";
12 version = "0.8.0";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n";
17 };
18
19 LC_ALL = "en_US.UTF-8";
20
21 propagatedBuildInputs = lib.optionals (pythonOlder "3.7") [ importlib-resources ];
22
23 nativeCheckInputs = [ glibcLocales pytestCheckHook ];
24
25 meta = with lib; {
26 homepage = "https://netaddr.readthedocs.io/en/latest/";
27 downloadPage = "https://github.com/netaddr/netaddr/releases";
28 changelog = "https://netaddr.readthedocs.io/en/latest/changes.html";
29 description = "A network address manipulation library for Python";
30 license = licenses.mit;
31 };
32}