Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 37 lines 920 B view raw
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4, pkgs 5}: 6 7buildPythonPackage rec { 8 pname = "pyenchant"; 9 version = "2.0.0"; 10 11 src = fetchPypi { 12 inherit pname version; 13 sha256 = "fc31cda72ace001da8fe5d42f11c26e514a91fa8c70468739216ddd8de64e2a0"; 14 }; 15 16 propagatedBuildInputs = [ pkgs.enchant1 ]; 17 18 patchPhase = let 19 path_hack_script = "s|LoadLibrary(e_path)|LoadLibrary('${pkgs.enchant1}/lib/' + e_path)|"; 20 in '' 21 sed -i "${path_hack_script}" enchant/_enchant.py 22 23 # They hardcode a bad path for Darwin in their library search code 24 substituteInPlace enchant/_enchant.py --replace '/opt/local/lib/' "" 25 ''; 26 27 # dictionaries needed for tests 28 doCheck = false; 29 30 meta = with stdenv.lib; { 31 description = "pyenchant: Python bindings for the Enchant spellchecker"; 32 homepage = https://pythonhosted.org/pyenchant/; 33 license = licenses.lgpl21; 34 badPlatforms = [ "x86_64-darwin" ]; 35 }; 36 37}