depot/third_party/nixpkgs/pkgs/tools/misc/steampipe/default.nix
Default email 8a45d4525b Project import generated by Copybara.
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
2022-03-30 11:31:56 +02:00

41 lines
1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "steampipe";
version = "0.13.3";
src = fetchFromGitHub {
owner = "turbot";
repo = "steampipe";
rev = "v${version}";
sha256 = "sha256-zU/FWrlE4TQhzRNOVED7hFub+lehPFD+fEJ3v0PFGdM=";
};
vendorSha256 = "sha256-0jixQcgSXQJAd899EWOUKde5OXZcSZwQfH7LRdQlm7c=";
proxyVendor = true;
# tests are failing for no obvious reasons
doCheck = false;
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 ];
};
}