diff options
author | Felix C. Stegerman <flx@obfusk.net> | 2021-07-08 15:24:27 +0200 |
---|---|---|
committer | Felix C. Stegerman <flx@obfusk.net> | 2021-07-08 15:24:27 +0200 |
commit | 1a198a2e99b9a27a39271d77b865be65d9a2b5dc (patch) | |
tree | 5cdef13a5ac7642f95df61c86fc8d508a6861d6d | |
parent | 4ee3e58fc4c80b77a72f63ffd6e01391ae13411e (diff) |
jiten: 1.0.0 -> 1.1.0
-rw-r--r-- | pkgs/applications/misc/jiten/default.nix | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/pkgs/applications/misc/jiten/default.nix b/pkgs/applications/misc/jiten/default.nix index 5447a2b30506e..efd28fabae3af 100644 --- a/pkgs/applications/misc/jiten/default.nix +++ b/pkgs/applications/misc/jiten/default.nix @@ -1,26 +1,35 @@ { lib , fetchFromGitHub -, python3Packages +, python3 +, bash , makeWrapper +, kanjidraw , pcre , sqlite , nodejs }: -python3Packages.buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "jiten"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitHub { owner = "obfusk"; repo = "jiten"; rev = "v${version}"; - sha256 = "1lg1n7f4383jdlkbma0q65yl6l159wgh886admcq7l7ap26zpqd2"; + sha256 = "13bdx136sirbhxdhvpq5kf0r6q1xvm5zyzp454z51gy0v6rn0qrp"; + }; + + nonFreeData = fetchFromGitHub { + owner = "obfusk"; + repo = "jiten-nonfree-data"; + rev = "v${version}"; + sha256 = "16sz8i0sw7ggy6kijcx4qyl2zr6xj789x4iav0yyllx12dfgp5b1"; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ pcre sqlite ]; - propagatedBuildInputs = with python3Packages; [ click flask ]; + propagatedBuildInputs = with python3.pkgs; [ click flask kanjidraw ]; checkInputs = [ nodejs ]; preBuild = '' @@ -29,11 +38,16 @@ python3Packages.buildPythonApplication rec { ''; postPatch = '' - substituteInPlace Makefile --replace /bin/bash "$(command -v bash)" - substituteInPlace jiten/res/jmdict/Makefile --replace /bin/bash "$(command -v bash)" + rmdir nonfree-data + 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 = '' # requires pywebview @@ -59,7 +73,8 @@ python3Packages.buildPythonApplication rec { • readings (romaji optional), meanings (english), jmdict entries, radicals & more • search using SKIP codes • search by radical - • browse by frequency/level/jlpt + • handwritten kanji recognition + • browse by frequency/level/jlpt/SKIP Example sentences (from Tatoeba) • with english, dutch, german, french and/or spanish translation @@ -83,9 +98,8 @@ python3Packages.buildPythonApplication rec { license = with licenses; [ agpl3Plus # code cc-by-sa-30 # jmdict/kanjidic - unfreeRedistributable # pitch data from wadoku is non-commercial :( + unfreeRedistributable # pitch data & audio are non-commercial ]; maintainers = [ maintainers.obfusk ]; - platforms = platforms.unix; }; } |