[Nix-dev] pyenchant: new package

Nick Sauce nick.sauce at monumentmail.com
Sat Sep 13 10:57:18 CEST 2014


pyenchant: new package
---

diff --git \
a/pkgs/top-level/python-packages.nix \
b/pkgs/top-level/python-packages.nix
index 34ecbff..aec3a3b 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -839,6 +839,36 @@ rec {
     };
   };
 
+  pyenchant = buildPythonPackage rec {
+    name = "pyenchant-1.6.6";
+
+    src = fetchurl {
+      url =
+        "https://pypi.python.org/packages/source/p/pyenchant/${name}.tar.gz";
+      sha256 =
+        "25c9d2667d512f8fc4410465fdd2e868377ca07eb3d56e2b6e534a86281d64d3";
+    };
+
+    propagatedBuildInputs = [ pkgs.enchant ];
+
+    # XXX: ctypes' cdll.LoadLibrary doesn't appear to function appropriately
+    patchPhase = let
+      path_hack_script =
+        "s|LoadLibrary(e_path)|LoadLibrary('${pkgs.enchant}/lib/' + e_path)|";
+    in ''
+        sed -i "${path_hack_script}" enchant/_enchant.py
+    '';
+
+    # dictionaries needed for tests
+    doCheck = false;
+
+    meta = {
+      description =
+        "Python spellchecking library, based on the Enchant library";
+      homepage = https://pythonhosted.org/pyenchant/;
+      license = stdenv.lib.licenses.lgpl21;
+    };
+  };
 
   bitbucket_api = buildPythonPackage rec {
     name = "bitbucket-api-0.4.4";




More information about the nix-dev mailing list