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";
|
2022-08-21 13:32:41 +00:00
|
|
|
version = "0.9.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "soimort";
|
|
|
|
repo = "translate-shell";
|
|
|
|
rev = "v${version}";
|
2022-08-21 13:32:41 +00:00
|
|
|
sha256 = "sha256-OLbGBP+QHW51mt0sFXf6SqrIYZ0iC/X10F148NAG4A4=";
|
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;
|
|
|
|
};
|
|
|
|
}
|