depot/third_party/nixpkgs/pkgs/development/tools/database/trino-cli/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

35 lines
918 B
Nix

{ lib, stdenv, fetchurl, jre_headless, makeWrapper }:
stdenv.mkDerivation rec {
pname = "trino-cli";
version = "413";
jarfilename = "${pname}-${version}-executable.jar";
nativeBuildInputs = [ makeWrapper ];
src = fetchurl {
url = "mirror://maven/io/trino/${pname}/${version}/${jarfilename}";
sha256 = "sha256-gsa5RbW9gz7TRhiU4bKLtxTZaggP9Ee6KpxhZBhpqgA=";
};
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";
homepage = "https://github.com/trinodb/trino";
license = licenses.asl20;
maintainers = with maintainers; [ regadas cpcloud ];
};
}