2018-03-24 21:50:23 +01:00
|
|
|
{ stdenv, fetchFromGitHub, makeWrapper, curl, fribidi, rlwrap, gawk, groff, ncurses }:
|
2016-08-17 16:20:55 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "translate-shell";
|
2019-07-30 06:26:18 +02:00
|
|
|
version = "0.9.6.11";
|
2016-08-17 16:20:55 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "soimort";
|
|
|
|
repo = "translate-shell";
|
2018-03-24 21:50:23 +01:00
|
|
|
rev = "v${version}";
|
2019-07-30 06:26:18 +02:00
|
|
|
sha256 = "137fz3ahzf65hfqcs4k7hhrmfjlhlw7wr3gfsvk88bnyqkyw44sm";
|
2016-08-17 16:20:55 +02:00
|
|
|
};
|
|
|
|
|
2018-03-24 21:50:23 +01:00
|
|
|
buildInputs = [ makeWrapper ];
|
2016-08-17 16:20:55 +02:00
|
|
|
|
2018-03-24 21:50:23 +01:00
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
2016-08-17 16:20:55 +02:00
|
|
|
|
2018-03-24 21:50:23 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/trans \
|
|
|
|
--prefix PATH : ${stdenv.lib.makeBinPath [
|
|
|
|
gawk
|
|
|
|
curl
|
|
|
|
ncurses
|
|
|
|
rlwrap
|
|
|
|
groff
|
|
|
|
fribidi
|
|
|
|
]}
|
2016-08-17 16:20:55 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.soimort.org/translate-shell";
|
2016-08-17 16:20:55 +02:00
|
|
|
description = "Command-line translator using Google Translate, Bing Translator, Yandex.Translate, and Apertium";
|
2018-03-24 21:50:23 +01:00
|
|
|
license = licenses.unlicense;
|
|
|
|
maintainers = with maintainers; [ ebzzry infinisil ];
|
2016-08-17 16:20:55 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|