about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ftfy/default.nix
blob: 36469c4ea82a70dd6c205fed6ce5a8ad60de49d1 (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
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder

# build-system
, poetry-core

# dependencies
, wcwidth

# tests
, pytestCheckHook
}:

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

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-aTJ0rq2BHP8kweh4QWWqdVzS9uRCpexTXH1pf2QipCI=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    wcwidth
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

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

  disabledTestPaths = [
    # Calls poetry and fails to match output exactly
    "tests/test_cli.py"
  ];


  meta = with lib; {
    description = "Given Unicode text, make its representation consistent and possibly less broken";
    mainProgram = "ftfy";
    homepage = "https://github.com/LuminosoInsight/python-ftfy";
    license = licenses.mit;
    maintainers = with maintainers; [ aborsu ];
  };
}