Update aider (#375634)
[NixPkgs.git] / pkgs / development / python-modules / cmigemo / default.nix
blob9237631c0532fb6fc32b9cb75e5a9fcd26213b93
2   stdenv,
3   lib,
4   buildPythonPackage,
5   fetchPypi,
6   six,
7   cmigemo,
8   pytestCheckHook,
9 }:
11 buildPythonPackage rec {
12   pname = "cmigemo";
13   version = "0.1.6";
14   format = "setuptools";
16   src = fetchPypi {
17     inherit pname version;
18     sha256 = "09j68kvcskav2cqb7pj12caksmj4wh2lhjp0csq00xpn0wqal4vk";
19   };
21   propagatedBuildInputs = [ six ];
23   preConfigure = ''
24     export LDFLAGS="-L${cmigemo}/lib"
25     export CPPFLAGS="-I${cmigemo}/include"
26     export LD_LIBRARY_PATH="${cmigemo}/lib"
27   '';
29   postPatch = ''
30     sed -i 's~dict_path_base = "/usr/share/cmigemo"~dict_path_base = "/${cmigemo}/share/migemo"~g' test/test_cmigemo.py
31   '';
33   nativeCheckInputs = [ pytestCheckHook ];
35   pytestFlagsArray = [ "test/" ];
37   pythonImportsCheck = [ "cmigemo" ];
39   meta = with lib; {
40     broken = stdenv.hostPlatform.isDarwin;
41     homepage = "https://github.com/mooz/python-cmigemo";
42     description = "Pure python binding for C/Migemo";
43     license = licenses.mit;
44     maintainers = with maintainers; [ illustris ];
45   };