From f66f16c103d74df95ccc484b23751ee8251407d8 Mon Sep 17 00:00:00 2001 From: regadas Date: Thu, 23 Jun 2022 16:39:58 +0100 Subject: [PATCH] trino-cli: init at 387 --- maintainers/maintainer-list.nix | 6 ++++ .../tools/database/trino-cli/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 pkgs/development/tools/database/trino-cli/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index cd5023ceda7a..3690890c6a94 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10645,6 +10645,12 @@ githubId = 1142322; name = "Martin Lavoie"; }; + regadas = { + email = "oss@regadas.email"; + name = "Filipe Regadas"; + github = "regadas"; + githubId = 163899; + }; regnat = { email = "regnat@regnat.ovh"; github = "regnat"; diff --git a/pkgs/development/tools/database/trino-cli/default.nix b/pkgs/development/tools/database/trino-cli/default.nix new file mode 100644 index 000000000000..aeeebf484d8f --- /dev/null +++ b/pkgs/development/tools/database/trino-cli/default.nix @@ -0,0 +1,35 @@ +{ lib, stdenv, fetchurl, jre, makeWrapper }: + +stdenv.mkDerivation rec { + pname = "trino-cli"; + version = "387"; + + jarfilename = "${pname}-${version}-executable.jar"; + + nativeBuildInputs = [ makeWrapper ]; + + src = fetchurl { + url = "mirror://maven/io/trino/${pname}/${version}/${jarfilename}"; + sha256 = "sha256-26TYtfxKLP3dW2uOoxc6rRnGXxnmbKG99xR0X7ntXDY="; + }; + + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index daa41e5e4db1..54bdb073bb57 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24049,6 +24049,8 @@ with pkgs; trinity = callPackage ../os-specific/linux/trinity { }; + trino-cli = callPackage ../development/tools/database/trino-cli { }; + trinsic-cli = callPackage ../tools/admin/trinsic-cli { inherit (darwin.apple_sdk.frameworks) Security; };