summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/ftfy/default.nix
blob: 0f6295323c05530956723ee717a3b98fdfd0c8b9 (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
44
45
46
47
48
49
50
51
52
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  hatchling,

  # dependencies
  wcwidth,

  # tests
  pytestCheckHook,
  versionCheckHook,
}:

buildPythonPackage rec {
  pname = "ftfy";
  version = "6.3.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "rspeer";
    repo = "python-ftfy";
    tag = "v${version}";
    hash = "sha256-TmwDJeUDcF+uOB2X5tMmnf9liCI9rP6dYJVmJoaqszo=";
  };

  build-system = [ hatchling ];

  dependencies = [ wcwidth ];

  pythonImportsCheck = [ "ftfy" ];

  nativeCheckInputs = [
    versionCheckHook
    pytestCheckHook
  ];

  preCheck = ''
    export PATH=$out/bin:$PATH
  '';

  meta = {
    changelog = "https://github.com/rspeer/python-ftfy/blob/${src.rev}/CHANGELOG.md";
    description = "Given Unicode text, make its representation consistent and possibly less broken";
    mainProgram = "ftfy";
    homepage = "https://github.com/LuminosoInsight/python-ftfy";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ aborsu ];
  };
}