587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
36 lines
945 B
Nix
36 lines
945 B
Nix
{ lib, stdenv, fetchurl, jre_headless, makeWrapper }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "trino-cli";
|
|
version = "439";
|
|
|
|
jarfilename = "${pname}-${version}-executable.jar";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
src = fetchurl {
|
|
url = "mirror://maven/io/trino/${pname}/${version}/${jarfilename}";
|
|
sha256 = "sha256-ANrv3+hpRn00zFAu6FHltk6seQ4lP2esDIhsJrctfY0=";
|
|
};
|
|
|
|
dontUnpack = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D "$src" "$out/share/java/${jarfilename}"
|
|
|
|
makeWrapper ${jre_headless}/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";
|
|
mainProgram = "trino";
|
|
homepage = "https://github.com/trinodb/trino";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ regadas cpcloud ];
|
|
};
|
|
}
|