summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/unidecode/default.nix
blob: 077606527740740370aa053978de84d668640f37 (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,
  fetchFromGitHub,
  pytestCheckHook,
  setuptools,
  nix-update-script,
}:

buildPythonPackage rec {
  pname = "unidecode";
  version = "1.4.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "avian2";
    repo = "unidecode";
    tag = "unidecode-${version}";
    hash = "sha256-CPogyDw8B1Xd3Bt6W9OaImVt+hFQsir16mnSYk8hFWQ=";
  };

  nativeBuildInputs = [ setuptools ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "unidecode" ];

  passthru.updateScript = nix-update-script {
    extraArgs = [
      "--version-regex"
      "unidecode-(.*)"
    ];
  };

  meta = {
    description = "ASCII transliterations of Unicode text";
    mainProgram = "unidecode";
    homepage = "https://github.com/avian2/unidecode";
    changelog = "https://github.com/avian2/unidecode/blob/unidecode-${version}/ChangeLog";
    license = lib.licenses.gpl2Plus;
    maintainers = [ ];
  };
}