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.8.8";
12 name = "${pname}-${version}";
13
14 src = fetchPypi {
15 inherit pname version;
16 sha256 = "e928cf853ef69d7471421f2a3716a1239e43de0fa9855f4016ee0c9f1057328a";
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}