about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ftfy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/ftfy/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/ftfy/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/ftfy/default.nix b/nixpkgs/pkgs/development/python-modules/ftfy/default.nix
new file mode 100644
index 000000000000..63342c7045d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/ftfy/default.nix
@@ -0,0 +1,43 @@
+{ lib, stdenv
+, buildPythonPackage
+, isPy3k
+, fetchPypi
+, html5lib
+, wcwidth
+, setuptools
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "ftfy";
+  version = "5.8";
+
+  disabled = !isPy3k;
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "081p5z20dirrf1i3nshylc31qd5mbxibjc7gzj8x4isbiizpdisi";
+  };
+
+  propagatedBuildInputs = [
+    html5lib
+    wcwidth
+    setuptools
+  ];
+
+  checkInputs = [
+    pytest
+  ];
+
+  # We suffix PATH like this because the tests want the ftfy executable
+  checkPhase = ''
+    PATH=$out/bin:$PATH pytest
+  '';
+
+  meta = with lib; {
+    description = "Given Unicode text, make its representation consistent and possibly less broken";
+    homepage = "https://github.com/LuminosoInsight/python-ftfy";
+    license = licenses.mit;
+    maintainers = with maintainers; [ sdll aborsu ];
+  };
+}