jiten: 1.0.0 -> 1.1.0
This commit is contained in:
parent
4ee3e58fc4
commit
1a198a2e99
|
@ -1,26 +1,35 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, python3Packages
|
, python3
|
||||||
|
, bash
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
|
, kanjidraw
|
||||||
, pcre
|
, pcre
|
||||||
, sqlite
|
, sqlite
|
||||||
, nodejs
|
, nodejs
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "jiten";
|
pname = "jiten";
|
||||||
version = "1.0.0";
|
version = "1.1.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "obfusk";
|
owner = "obfusk";
|
||||||
repo = "jiten";
|
repo = "jiten";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1lg1n7f4383jdlkbma0q65yl6l159wgh886admcq7l7ap26zpqd2";
|
sha256 = "13bdx136sirbhxdhvpq5kf0r6q1xvm5zyzp454z51gy0v6rn0qrp";
|
||||||
|
};
|
||||||
|
|
||||||
|
nonFreeData = fetchFromGitHub {
|
||||||
|
owner = "obfusk";
|
||||||
|
repo = "jiten-nonfree-data";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "16sz8i0sw7ggy6kijcx4qyl2zr6xj789x4iav0yyllx12dfgp5b1";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = [ pcre sqlite ];
|
buildInputs = [ pcre sqlite ];
|
||||||
propagatedBuildInputs = with python3Packages; [ click flask ];
|
propagatedBuildInputs = with python3.pkgs; [ click flask kanjidraw ];
|
||||||
checkInputs = [ nodejs ];
|
checkInputs = [ nodejs ];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
|
@ -29,11 +38,16 @@ python3Packages.buildPythonApplication rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace Makefile --replace /bin/bash "$(command -v bash)"
|
rmdir nonfree-data
|
||||||
substituteInPlace jiten/res/jmdict/Makefile --replace /bin/bash "$(command -v bash)"
|
ln -s ${nonFreeData} nonfree-data
|
||||||
|
substituteInPlace Makefile --replace /bin/bash ${bash}/bin/bash
|
||||||
|
substituteInPlace jiten/res/jmdict/Makefile \
|
||||||
|
--replace /bin/bash ${bash}/bin/bash
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = "make test";
|
checkPhase = ''
|
||||||
|
make test
|
||||||
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# requires pywebview
|
# requires pywebview
|
||||||
|
@ -59,7 +73,8 @@ python3Packages.buildPythonApplication rec {
|
||||||
• readings (romaji optional), meanings (english), jmdict entries, radicals & more
|
• readings (romaji optional), meanings (english), jmdict entries, radicals & more
|
||||||
• search using SKIP codes
|
• search using SKIP codes
|
||||||
• search by radical
|
• search by radical
|
||||||
• browse by frequency/level/jlpt
|
• handwritten kanji recognition
|
||||||
|
• browse by frequency/level/jlpt/SKIP
|
||||||
|
|
||||||
Example sentences (from Tatoeba)
|
Example sentences (from Tatoeba)
|
||||||
• with english, dutch, german, french and/or spanish translation
|
• with english, dutch, german, french and/or spanish translation
|
||||||
|
@ -83,9 +98,8 @@ python3Packages.buildPythonApplication rec {
|
||||||
license = with licenses; [
|
license = with licenses; [
|
||||||
agpl3Plus # code
|
agpl3Plus # code
|
||||||
cc-by-sa-30 # jmdict/kanjidic
|
cc-by-sa-30 # jmdict/kanjidic
|
||||||
unfreeRedistributable # pitch data from wadoku is non-commercial :(
|
unfreeRedistributable # pitch data & audio are non-commercial
|
||||||
];
|
];
|
||||||
maintainers = [ maintainers.obfusk ];
|
maintainers = [ maintainers.obfusk ];
|
||||||
platforms = platforms.unix;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue