1{ lib, buildPythonPackage, fetchPypi, pythonOlder,
2 # Build inputs
3 dateutil, six, text-unidecode, 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.8.18";
12
13 src = fetchPypi {
14 inherit pname version;
15 sha256 = "0184fa252f86214308bb6bed344f96294f2e3528fbffafc727890cf2a86d6027";
16 };
17
18 checkInputs = [
19 email_validator
20 nose
21 mock
22 ukpostcodeparser
23 ];
24
25 propagatedBuildInputs = [
26 dateutil
27 six
28 text-unidecode
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}