2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, curl, fribidi, rlwrap, gawk, groff, ncurses, hexdump }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "translate-shell";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "0.9.7.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "soimort";
|
|
|
|
repo = "translate-shell";
|
|
|
|
rev = "v${version}";
|
2023-02-09 11:40:11 +00:00
|
|
|
sha256 = "sha256-ILXE8cSrivYqMruE+xtNIInLdwdRfMX5dneY9Nn12Uk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/trans \
|
2021-01-15 22:18:51 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [
|
2020-04-24 23:36:52 +00:00
|
|
|
gawk
|
|
|
|
curl
|
|
|
|
ncurses
|
|
|
|
rlwrap
|
|
|
|
groff
|
|
|
|
fribidi
|
2021-12-06 16:07:01 +00:00
|
|
|
hexdump
|
2020-04-24 23:36:52 +00:00
|
|
|
]}
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.soimort.org/translate-shell";
|
|
|
|
description = "Command-line translator using Google Translate, Bing Translator, Yandex.Translate, and Apertium";
|
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [ ebzzry infinisil ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "trans";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|