depot/third_party/nixpkgs/pkgs/applications/misc/translate-shell/default.nix
Default email 66604c92c1 Project import generated by Copybara.
GitOrigin-RevId: 32b8ed738096bafb4cdb7f70347a0f63f9f40151
2020-05-15 23:57:56 +02:00

37 lines
958 B
Nix

{ stdenv, fetchFromGitHub, makeWrapper, curl, fribidi, rlwrap, gawk, groff, ncurses }:
stdenv.mkDerivation rec {
pname = "translate-shell";
version = "0.9.6.12";
src = fetchFromGitHub {
owner = "soimort";
repo = "translate-shell";
rev = "v${version}";
sha256 = "075vqnha21rhr1b61dim7dqlfwm1yffyzcaa83s36rpk9r5sddzx";
};
buildInputs = [ makeWrapper ];
installFlags = [ "PREFIX=$(out)" ];
postInstall = ''
wrapProgram $out/bin/trans \
--prefix PATH : ${stdenv.lib.makeBinPath [
gawk
curl
ncurses
rlwrap
groff
fribidi
]}
'';
meta = with stdenv.lib; {
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 ];
platforms = platforms.unix;
};
}