depot/third_party/nixpkgs/pkgs/tools/misc/steampipe/default.nix
Default email bb584b27e9 Project import generated by Copybara.
GitOrigin-RevId: 5181d5945eda382ff6a9ca3e072ed6ea9b547fee
2022-04-15 03:41:22 +02:00

38 lines
1,005 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "steampipe";
version = "0.13.4";
src = fetchFromGitHub {
owner = "turbot";
repo = "steampipe";
rev = "v${version}";
sha256 = "sha256-Qq8i/uU2TtrEpvTPFmnZdku2vNo5O240dAT2OQKel1U=";
};
vendorSha256 = "sha256-pEQG9BHhsVDVSOoKJBocLXMLjmP72RM+GXz4nYD4D7s=";
proxyVendor = true;
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
];
postInstall = ''
INSTALL_DIR=$(mktemp -d)
installShellCompletion --cmd steampipe \
--bash <($out/bin/steampipe --install-dir $INSTALL_DIR completion bash) \
--fish <($out/bin/steampipe --install-dir $INSTALL_DIR completion fish) \
--zsh <($out/bin/steampipe --install-dir $INSTALL_DIR completion zsh)
'';
meta = with lib; {
homepage = "https://steampipe.io/";
description = "select * from cloud;";
license = licenses.agpl3;
maintainers = with maintainers; [ hardselius ];
};
}