1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonAtLeast
5, python
6}:
7
8if (pythonAtLeast "3.3") then null else buildPythonPackage rec {
9 pname = "ipaddress";
10 version = "1.0.23";
11
12 src = fetchPypi {
13 inherit pname version;
14 sha256 = "b7f8e0369580bb4a24d5ba1d7cc29660a4a6987763faf1d8a8046830e020e7e2";
15 };
16
17 checkPhase = ''
18 ${python.interpreter} test_ipaddress.py
19 '';
20
21 meta = with lib; {
22 description = "Port of the 3.3+ ipaddress module to 2.6, 2.7, and 3.2";
23 homepage = "https://github.com/phihag/ipaddress";
24 license = licenses.psfl;
25 };
26
27}