Merge pull request #120012 from vs49688/orcli
This commit is contained in:
commit
6a2783899a
3 changed files with 73 additions and 0 deletions
|
@ -11304,6 +11304,16 @@
|
|||
github = "pulsation";
|
||||
githubId = 1838397;
|
||||
};
|
||||
zane = {
|
||||
name = "Zane van Iperen";
|
||||
email = "zane@zanevaniperen.com";
|
||||
github = "vs49688";
|
||||
githubId = 4423262;
|
||||
keys = [{
|
||||
longkeyid = "rsa4096/0x68616B2D8AC4DCC5";
|
||||
fingerprint = "61AE D40F 368B 6F26 9DAE 3892 6861 6B2D 8AC4 DCC5";
|
||||
}];
|
||||
};
|
||||
zseri = {
|
||||
name = "zseri";
|
||||
email = "zseri.devel@ytrizja.de";
|
||||
|
|
61
pkgs/misc/openrussian-cli/default.nix
Normal file
61
pkgs/misc/openrussian-cli/default.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ stdenv, lib, fetchFromGitHub, gnumake, pkg-config, wget, unzip, gawk
|
||||
, sqlite, which, luaPackages, installShellFiles, makeWrapper
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openrussian-cli";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhaberkorn";
|
||||
repo = "openrussian-cli";
|
||||
rev = version;
|
||||
sha256 = "1ria7s7dpqip2wdwn35wmkry84g8ghdqnxc9cbxzzq63vl6pgvcn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gnumake pkg-config wget unzip gawk sqlite which installShellFiles makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = with luaPackages; [ lua luasql-sqlite3 luautf8 ];
|
||||
|
||||
makeFlags = [
|
||||
"LUA=${luaPackages.lua}/bin/lua"
|
||||
"LUAC=${luaPackages.lua}/bin/luac"
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
# Disable check as it's too slow.
|
||||
# doCheck = true;
|
||||
|
||||
#This is needed even though it's the default for some reason.
|
||||
checkTarget = "check";
|
||||
|
||||
# Can't use "make install" here
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin $out/share/openrussian
|
||||
cp openrussian-sqlite3.db $out/share/openrussian
|
||||
cp openrussian $out/bin
|
||||
|
||||
wrapProgram $out/bin/openrussian \
|
||||
--prefix LUA_PATH ';' "$LUA_PATH" \
|
||||
--prefix LUA_CPATH ';' "$LUA_CPATH"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd openrussian --bash ./openrussian-completion.bash
|
||||
installManPage ./openrussian.1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/rhaberkorn/openrussian-cli";
|
||||
description = "Offline Console Russian Dictionary (based on openrussian.org)";
|
||||
license = with licenses; [ gpl3Only mit cc-by-sa-40 ];
|
||||
maintainers = with maintainers; [ zane ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -7163,6 +7163,8 @@ in
|
|||
|
||||
openrgb = libsForQt5.callPackage ../applications/misc/openrgb { };
|
||||
|
||||
openrussian-cli = callPackage ../misc/openrussian-cli { };
|
||||
|
||||
opensc = callPackage ../tools/security/opensc {
|
||||
inherit (darwin.apple_sdk.frameworks) Carbon PCSC;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue