16 luaEnv = lua5_3.withPackages (p: with p; [ luasql-sqlite3 luautf8 ]);
18 stdenv.mkDerivation rec {
19 pname = "openrussian-cli";
22 src = fetchFromGitHub {
24 repo = "openrussian-cli";
26 hash = "sha256-lu13Dd3D4P/7Yol1ixt86BHk86y8DMsbFzfi244+KuY=";
31 url = "https://github.com/rhaberkorn/openrussian-cli/commit/984e555acbadbd1aed7df17ab53e2c586a2f8f68.patch";
32 hash = "sha256-/z4YrEeuejtCtwiFXksFREwgQoWvtI0Kl9w75KDQfF8=";
34 # Work around https://github.com/dumblob/mysql2sqlite/issues/75
49 buildInputs = [ luaEnv ];
52 "LUA=${luaEnv}/bin/lua"
53 "LUAC=${luaEnv}/bin/luac"
58 # Can't use "make install" here
62 mkdir -p $out/bin $out/share/openrussian
63 cp openrussian-sqlite3.db $out/share/openrussian
64 cp openrussian $out/bin
66 wrapProgram $out/bin/openrussian \
67 --prefix LUA_PATH ';' '${lua5_3.pkgs.luaLib.genLuaPathAbsStr luaEnv}' \
68 --prefix LUA_CPATH ';' '${lua5_3.pkgs.luaLib.genLuaCPathAbsStr luaEnv}'
74 installShellCompletion --cmd openrussian --bash ./openrussian-completion.bash
75 installManPage ./openrussian.1
79 description = "Offline Console Russian Dictionary (based on openrussian.org)";
80 homepage = "https://github.com/rhaberkorn/openrussian-cli";
81 license = with licenses; [ gpl3Only mit cc-by-sa-40 ];
82 maintainers = with maintainers; [ zane ];
83 mainProgram = "openrussian";
84 platforms = platforms.unix;