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