tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
jiten: 1.0.0 -> 1.1.0
Felix C. Stegerman
4 years ago
1a198a2e
4ee3e58f
+25
-11
1 changed file
expand all
collapse all
unified
split
pkgs
applications
misc
jiten
default.nix
+25
-11
pkgs/applications/misc/jiten/default.nix
···
1
1
{ lib
2
2
, fetchFromGitHub
3
3
-
, python3Packages
3
3
+
, python3
4
4
+
, bash
4
5
, makeWrapper
6
6
+
, kanjidraw
5
7
, pcre
6
8
, sqlite
7
9
, nodejs
8
10
}:
9
11
10
10
-
python3Packages.buildPythonApplication rec {
12
12
+
python3.pkgs.buildPythonApplication rec {
11
13
pname = "jiten";
12
12
-
version = "1.0.0";
14
14
+
version = "1.1.0";
13
15
14
16
src = fetchFromGitHub {
15
17
owner = "obfusk";
16
18
repo = "jiten";
17
19
rev = "v${version}";
18
18
-
sha256 = "1lg1n7f4383jdlkbma0q65yl6l159wgh886admcq7l7ap26zpqd2";
20
20
+
sha256 = "13bdx136sirbhxdhvpq5kf0r6q1xvm5zyzp454z51gy0v6rn0qrp";
21
21
+
};
22
22
+
23
23
+
nonFreeData = fetchFromGitHub {
24
24
+
owner = "obfusk";
25
25
+
repo = "jiten-nonfree-data";
26
26
+
rev = "v${version}";
27
27
+
sha256 = "16sz8i0sw7ggy6kijcx4qyl2zr6xj789x4iav0yyllx12dfgp5b1";
19
28
};
20
29
21
30
nativeBuildInputs = [ makeWrapper ];
22
31
buildInputs = [ pcre sqlite ];
23
23
-
propagatedBuildInputs = with python3Packages; [ click flask ];
32
32
+
propagatedBuildInputs = with python3.pkgs; [ click flask kanjidraw ];
24
33
checkInputs = [ nodejs ];
25
34
26
35
preBuild = ''
···
29
38
'';
30
39
31
40
postPatch = ''
32
32
-
substituteInPlace Makefile --replace /bin/bash "$(command -v bash)"
33
33
-
substituteInPlace jiten/res/jmdict/Makefile --replace /bin/bash "$(command -v bash)"
41
41
+
rmdir nonfree-data
42
42
+
ln -s ${nonFreeData} nonfree-data
43
43
+
substituteInPlace Makefile --replace /bin/bash ${bash}/bin/bash
44
44
+
substituteInPlace jiten/res/jmdict/Makefile \
45
45
+
--replace /bin/bash ${bash}/bin/bash
34
46
'';
35
47
36
36
-
checkPhase = "make test";
48
48
+
checkPhase = ''
49
49
+
make test
50
50
+
'';
37
51
38
52
postInstall = ''
39
53
# requires pywebview
···
59
73
• readings (romaji optional), meanings (english), jmdict entries, radicals & more
60
74
• search using SKIP codes
61
75
• search by radical
62
62
-
• browse by frequency/level/jlpt
76
76
+
• handwritten kanji recognition
77
77
+
• browse by frequency/level/jlpt/SKIP
63
78
64
79
Example sentences (from Tatoeba)
65
80
• with english, dutch, german, french and/or spanish translation
···
83
98
license = with licenses; [
84
99
agpl3Plus # code
85
100
cc-by-sa-30 # jmdict/kanjidic
86
86
-
unfreeRedistributable # pitch data from wadoku is non-commercial :(
101
101
+
unfreeRedistributable # pitch data & audio are non-commercial
87
102
];
88
103
maintainers = [ maintainers.obfusk ];
89
89
-
platforms = platforms.unix;
90
104
};
91
105
}