faker: add ipaddress dependency for Python 2
Faker requires ipaddress package on Python < 3.3: https://github.com/joke2k/faker/blob/v0.7.18/setup.py#L66-L76
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
{ stdenv, lib, buildPythonPackage, fetchPypi,
|
{ lib, buildPythonPackage, fetchPypi, pythonOlder,
|
||||||
# Build inputs
|
# Build inputs
|
||||||
dateutil, six,
|
dateutil, six, ipaddress ? null,
|
||||||
# Test inputs
|
# Test inputs
|
||||||
email_validator, nose, mock, ukpostcodeparser }:
|
email_validator, nose, mock, ukpostcodeparser }:
|
||||||
|
|
||||||
|
assert pythonOlder "3.3" -> ipaddress != null;
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "Faker";
|
pname = "Faker";
|
||||||
version = "0.7.18";
|
version = "0.7.18";
|
||||||
@@ -24,7 +26,7 @@ buildPythonPackage rec {
|
|||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
dateutil
|
dateutil
|
||||||
six
|
six
|
||||||
];
|
] ++ lib.optional (pythonOlder "3.3") ipaddress;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Python library for generating fake user data";
|
description = "A Python library for generating fake user data";
|
||||||
|
|||||||
Reference in New Issue
Block a user