tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
python312Packages.attacut: init at 1.1.0-dev
Radik Islamov
2 years ago
b7f4262d
909e958a
+75
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
attacut
default.nix
top-level
python-packages.nix
+73
pkgs/development/python-modules/attacut/default.nix
···
1
1
+
{
2
2
+
lib,
3
3
+
buildPythonPackage,
4
4
+
fetchFromGitHub,
5
5
+
fetchpatch,
6
6
+
7
7
+
setuptools,
8
8
+
9
9
+
pytestCheckHook,
10
10
+
11
11
+
docopt,
12
12
+
fire,
13
13
+
numpy,
14
14
+
python-crfsuite,
15
15
+
pyyaml,
16
16
+
six,
17
17
+
ssg,
18
18
+
torch,
19
19
+
}:
20
20
+
21
21
+
buildPythonPackage rec {
22
22
+
pname = "attacut";
23
23
+
version = "1.1.0-dev";
24
24
+
pyproject = true;
25
25
+
26
26
+
src = fetchFromGitHub {
27
27
+
owner = "PyThaiNLP";
28
28
+
repo = "attacut";
29
29
+
rev = "refs/tags/v${version}";
30
30
+
hash = "sha256-x3JJC1Xd+tsOAHJEHGzIrhIrNGSvLSanAFc7+uXb2Kk=";
31
31
+
};
32
32
+
33
33
+
# no more need, see patch...
34
34
+
postPatch = ''
35
35
+
sed -i "/nptyping>=/d" setup.py
36
36
+
'';
37
37
+
38
38
+
patches = [
39
39
+
(fetchpatch {
40
40
+
name = "fix-nptyping-deprecated-array.patch";
41
41
+
url = "https://github.com/PyThaiNLP/attacut/commit/a707297b3f08a015d32d8ac241aa8cb11128cbd4.patch";
42
42
+
includes = [ "attacut/evaluation.py" ];
43
43
+
hash = "sha256-k2DJPwiH1Fyf5u6+zavx0bankCXsJVZrw1MGcf8ZL+M=";
44
44
+
})
45
45
+
];
46
46
+
47
47
+
build-system = [ setuptools ];
48
48
+
49
49
+
dependencies = [
50
50
+
docopt
51
51
+
fire
52
52
+
numpy
53
53
+
python-crfsuite
54
54
+
pyyaml
55
55
+
six
56
56
+
ssg
57
57
+
torch
58
58
+
];
59
59
+
60
60
+
nativeCheckInputs = [ pytestCheckHook ];
61
61
+
62
62
+
pytestFlagsArray = [ "tests/*" ];
63
63
+
64
64
+
pythonImportsCheck = [ "attacut" ];
65
65
+
66
66
+
meta = with lib; {
67
67
+
description = "A Fast and Accurate Neural Thai Word Segmenter";
68
68
+
homepage = "https://github.com/PyThaiNLP/attacut";
69
69
+
license = licenses.mit;
70
70
+
maintainers = with maintainers; [ vizid ];
71
71
+
mainProgram = "attacut-cli";
72
72
+
};
73
73
+
}
+2
pkgs/top-level/python-packages.nix
···
925
925
926
926
atsim-potentials = callPackage ../development/python-modules/atsim-potentials { };
927
927
928
928
+
attacut = callPackage ../development/python-modules/attacut { };
929
929
+
928
930
attrdict = callPackage ../development/python-modules/attrdict { };
929
931
930
932
attrs = callPackage ../development/python-modules/attrs { };