2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, makeWrapper, curl, fribidi, rlwrap, gawk, groff, ncurses }:
|
2016-08-17 16:20:55 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "translate-shell";
|
2020-05-11 11:20:00 +02:00
|
|
|
version = "0.9.6.12";
|
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}";
|
2020-05-11 11:20:00 +02:00
|
|
|
sha256 = "075vqnha21rhr1b61dim7dqlfwm1yffyzcaa83s36rpk9r5sddzx";
|
2016-08-17 16:20:55 +02:00
|
|
|
};
|
|
|
|
|
2021-02-07 10:17:39 +01:00
|
|
|
nativeBuildInputs = [ 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 \
|
2021-01-15 06:42:41 +01:00
|
|
|
--prefix PATH : ${lib.makeBinPath [
|
2018-03-24 21:50:23 +01:00
|
|
|
gawk
|
|
|
|
curl
|
|
|
|
ncurses
|
|
|
|
rlwrap
|
|
|
|
groff
|
|
|
|
fribidi
|
|
|
|
]}
|
2016-08-17 16:20:55 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with 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;
|
|
|
|
};
|
|
|
|
}
|