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