1{ lib, buildPythonPackage, fetchPypi, pythonOlder, 2 # Build inputs 3 dateutil, six, ipaddress ? null, 4 # Test inputs 5 email_validator, nose, mock, ukpostcodeparser }: 6 7assert pythonOlder "3.3" -> ipaddress != null; 8 9buildPythonPackage rec { 10 pname = "Faker"; 11 version = "0.7.18"; 12 name = "${pname}-${version}"; 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "310b20f3c497a777622920dca314d90f774028d49c7ee7ccfa96ca4b9d9bf429"; 17 }; 18 19 checkInputs = [ 20 email_validator 21 nose 22 mock 23 ukpostcodeparser 24 ]; 25 26 propagatedBuildInputs = [ 27 dateutil 28 six 29 ] ++ lib.optional (pythonOlder "3.3") ipaddress; 30 31 meta = with lib; { 32 description = "A Python library for generating fake user data"; 33 homepage = http://faker.rtfd.org; 34 license = licenses.mit; 35 maintainers = with maintainers; [ lovek323 ]; 36 platforms = platforms.unix; 37 }; 38}