1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, isPy27
5, regex
6, csvw
7, clldutils
8, mock
9, pytestCheckHook
10, pytest-mock
11}:
12
13buildPythonPackage rec {
14 pname = "segments";
15 version = "2.2.0";
16 disabled = isPy27;
17
18 src = fetchFromGitHub {
19 owner = "cldf";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "04yc8q79zk09xj0wnal0vdg5azi9jlarfmf2iyljqyr80p79gwvv";
23 };
24
25 patchPhase = ''
26 substituteInPlace setup.cfg --replace "--cov" ""
27 '';
28
29 propagatedBuildInputs = [
30 regex
31 csvw
32 clldutils
33 ];
34
35 nativeCheckInputs = [
36 mock
37 pytestCheckHook
38 pytest-mock
39 ];
40
41 meta = with lib; {
42 description = "Unicode Standard tokenization routines and orthography profile segmentation";
43 homepage = "https://github.com/cldf/segments";
44 license = licenses.asl20;
45 maintainers = with maintainers; [ ];
46 };
47}