2022-12-17 10:02:37 +00:00
|
|
|
{ lib, stdenv, fetchurl, jre_headless, makeWrapper }:
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "trino-cli";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "439";
|
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}";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-ANrv3+hpRn00zFAu6FHltk6seQ4lP2esDIhsJrctfY0=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D "$src" "$out/share/java/${jarfilename}"
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
makeWrapper ${jre_headless}/bin/java $out/bin/trino \
|
2022-07-14 12:49:19 +00:00
|
|
|
--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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "trino";
|
2022-07-14 12:49:19 +00:00
|
|
|
homepage = "https://github.com/trinodb/trino";
|
|
|
|
license = licenses.asl20;
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = with maintainers; [ regadas cpcloud ];
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
}
|