about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/python-modules/faker/default.nix36
-rw-r--r--pkgs/top-level/python-packages.nix17
2 files changed, 37 insertions, 16 deletions
diff --git a/pkgs/development/python-modules/faker/default.nix b/pkgs/development/python-modules/faker/default.nix
new file mode 100644
index 000000000000..d5934f38b88d
--- /dev/null
+++ b/pkgs/development/python-modules/faker/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, buildPythonPackage, fetchPypi,
+  # Build inputs
+  dateutil, six,
+  # Test inputs
+  email_validator, nose, mock, ukpostcodeparser }:
+
+buildPythonPackage rec {
+  pname = "Faker";
+  version = "0.7.17";
+  name = "${pname}-${version}";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0n4achwr6dcf67n983ls5cbp5ic3jrwsbl92rzjlzb1xvz1s1js9";
+  };
+
+  checkInputs = [
+    email_validator
+    nose
+    mock
+    ukpostcodeparser
+  ];
+
+  propagatedBuildInputs = [
+    dateutil
+    six
+  ];
+
+  meta = with lib; {
+    description = "A Python library for generating fake user data";
+    homepage    = http://faker.rtfd.org;
+    license     = licenses.mit;
+    maintainers = with maintainers; [ lovek323 ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 2bb2b161ccec..7cf16707d260 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -5960,22 +5960,7 @@ in {
     };
   };
 
-  faker = buildPythonPackage rec {
-    name = "faker-0.0.4";
-    disabled = isPy3k;
-    src = pkgs.fetchurl {
-      url = mirror://pypi/F/Faker/Faker-0.0.4.tar.gz;
-      sha256 = "09q5jna3j8di0gw5yjx0dvlndkrk2x9vvqzwyfsvg3nlp8h38js1";
-    };
-    buildInputs = with self; [ nose ];
-    meta = {
-      description = "A Python library for generating fake user data";
-      homepage    = http://pypi.python.org/pypi/Faker;
-      license     = licenses.mit;
-      maintainers = with maintainers; [ lovek323 ];
-      platforms   = platforms.unix;
-    };
-  };
+  faker = callPackage ../development/python-modules/faker { };
 
   fake_factory = buildPythonPackage rec {
     name = "fake-factory-${version}";