3e96aebf4e
Moves default enchant to 2.2.3. Release url: https://github.com/AbiWord/enchant/releases/tag/v2.0.0 Mostly need to verify no breakage occurs for packages using enchant.
38 lines
920 B
Nix
38 lines
920 B
Nix
{ stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, pkgs
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyenchant";
|
|
version = "2.0.0";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "fc31cda72ace001da8fe5d42f11c26e514a91fa8c70468739216ddd8de64e2a0";
|
|
};
|
|
|
|
propagatedBuildInputs = [ pkgs.enchant1 ];
|
|
|
|
patchPhase = let
|
|
path_hack_script = "s|LoadLibrary(e_path)|LoadLibrary('${pkgs.enchant1}/lib/' + e_path)|";
|
|
in ''
|
|
sed -i "${path_hack_script}" enchant/_enchant.py
|
|
|
|
# They hardcode a bad path for Darwin in their library search code
|
|
substituteInPlace enchant/_enchant.py --replace '/opt/local/lib/' ""
|
|
'';
|
|
|
|
# dictionaries needed for tests
|
|
doCheck = false;
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "pyenchant: Python bindings for the Enchant spellchecker";
|
|
homepage = https://pythonhosted.org/pyenchant/;
|
|
license = licenses.lgpl21;
|
|
badPlatforms = [ "x86_64-darwin" ];
|
|
};
|
|
|
|
}
|