2022-07-14 12:49:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, jre, makeWrapper }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "trino-cli";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "392";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
jarfilename = "${pname}-${version}-executable.jar";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://maven/io/trino/${pname}/${version}/${jarfilename}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-yqTKXmcRgsSSr4KAZ2NV7FrCGIxCU/V14XFEZmUTj1s=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D "$src" "$out/share/java/${jarfilename}"
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/trino \
|
|
|
|
--add-flags "-jar $out/share/java/${jarfilename}"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The Trino CLI provides a terminal-based, interactive shell for running queries";
|
|
|
|
homepage = "https://github.com/trinodb/trino";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.regadas ];
|
|
|
|
};
|
|
|
|
}
|