summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/mecab-python3/default.nix
blob: 96eaff0f820105df3b306d3b9f926509b417b390 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  lib,
  buildPythonPackage,
  fetchPypi,
  mecab,
  swig,
  setuptools-scm,
}:

buildPythonPackage rec {
  pname = "mecab-python3";
  version = "1.0.12";
  format = "setuptools";

  src = fetchPypi {
    pname = "mecab_python3";
    inherit version;
    hash = "sha256-mroeVu+A3ZcUfcv441CBR68Sn7Rs7A5DK4X5apvapLk=";
  };

  nativeBuildInputs = [
    mecab # for mecab-config
    swig
    setuptools-scm
  ];

  buildInputs = [ mecab ];

  doCheck = false;

  pythonImportsCheck = [ "MeCab" ];

  meta = {
    description = "Python wrapper for mecab: Morphological Analysis engine";
    homepage = "https://github.com/SamuraiT/mecab-python3";
    changelog = "https://github.com/SamuraiT/mecab-python3/releases/tag/v${version}";
    license = with lib.licenses; [
      gpl2
      lgpl21
      bsd3
    ]; # any of the three
  };
}