about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pykakasi/default.nix
blob: 76e2711ee18c21a695783034db971025d8153f59 (plain) (blame)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{ lib
, buildPythonPackage
, deprecated
, fetchFromGitHub
, importlib-metadata
, jaconv
, py-cpuinfo
, pytest-benchmark
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:

buildPythonPackage rec {
  pname = "pykakasi";
  version = "2.2.1";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "miurahr";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-ivlenHPD00bxc0c9G368tfTEckOC3vqDB5kMQzHXbVM==";
  };

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    jaconv
    deprecated
  ] ++ lib.optionals (pythonOlder "3.8") [
    importlib-metadata
  ];

  nativeCheckInputs = [
    py-cpuinfo
    pytest-benchmark
    pytestCheckHook
  ];

  disabledTests = [
    # We don't care about benchmarks
    "test_benchmark"
    "pytest_benchmark_update_machine_info"
    "pytest_benchmark_update_json"
  ];

  pythonImportsCheck = [
    "pykakasi"
  ];

  meta = with lib; {
    description = "Python converter for Japanese Kana-kanji sentences into Kana-Roman";
    homepage = "https://github.com/miurahr/pykakasi";
    changelog = "https://github.com/miurahr/pykakasi/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}