17 luaEnv = lua5_3.withPackages (
24 stdenv.mkDerivation rec {
25 pname = "openrussian-cli";
28 src = fetchFromGitHub {
30 repo = "openrussian-cli";
32 hash = "sha256-lu13Dd3D4P/7Yol1ixt86BHk86y8DMsbFzfi244+KuY=";
37 url = "https://github.com/rhaberkorn/openrussian-cli/commit/984e555acbadbd1aed7df17ab53e2c586a2f8f68.patch";
38 hash = "sha256-/z4YrEeuejtCtwiFXksFREwgQoWvtI0Kl9w75KDQfF8=";
40 # Work around https://github.com/dumblob/mysql2sqlite/issues/75
55 buildInputs = [ luaEnv ];
58 "LUA=${luaEnv}/bin/lua"
59 "LUAC=${luaEnv}/bin/luac"
64 # Can't use "make install" here
68 mkdir -p $out/bin $out/share/openrussian
69 cp openrussian-sqlite3.db $out/share/openrussian
70 cp openrussian $out/bin
72 wrapProgram $out/bin/openrussian \
73 --prefix LUA_PATH ';' '${lua5_3.pkgs.luaLib.genLuaPathAbsStr luaEnv}' \
74 --prefix LUA_CPATH ';' '${lua5_3.pkgs.luaLib.genLuaCPathAbsStr luaEnv}'
80 installShellCompletion --cmd openrussian --bash ./openrussian-completion.bash
81 installManPage ./openrussian.1
85 description = "Offline Console Russian Dictionary (based on openrussian.org)";
86 homepage = "https://github.com/rhaberkorn/openrussian-cli";
87 license = with licenses; [
92 maintainers = with maintainers; [ zane ];
93 mainProgram = "openrussian";
94 platforms = platforms.unix;