btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / development / python-modules / unidic / default.nix
blob69e38dafef065dc78b1fc68db68c83314498bf6d
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   mecab,
7   setuptools-scm,
8   requests,
9   tqdm,
10   wasabi,
11   plac,
12   cython,
13   platformdirs,
16 buildPythonPackage rec {
17   pname = "unidic";
18   version = "1.1.0";
19   format = "setuptools";
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "polm";
24     repo = "unidic-py";
25     rev = "refs/tags/v${version}";
26     hash = "sha256-srhQDXGgoIMhYuCbyQB3kF4LrODnoOqLbjBQMvhPieY=";
27   };
29   patches = [ ./fix-download-directory.patch ];
31   postPatch = ''
32     substituteInPlace setup.cfg \
33       --replace "wasabi>=0.6.0,<1.0.0" "wasabi"
34   '';
36   # no tests
37   doCheck = false;
39   propagatedBuildInputs = [
40     requests
41     tqdm
42     wasabi
43     plac
44     platformdirs
45   ];
47   nativeBuildInputs = [
48     cython
49     mecab
50     setuptools-scm
51   ];
53   pythonImportsCheck = [ "unidic" ];
55   meta = with lib; {
56     description = "Contemporary Written Japanese dictionary";
57     homepage = "https://github.com/polm/unidic-py";
58     license = licenses.mit;
59     maintainers = with maintainers; [ laurent-f1z1 ];
60   };