nixpkgs/pkgs/tools/misc/steampipe/default.nix
2021-12-02 16:07:45 -08:00

40 lines
1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "steampipe";
version = "0.10.0";
src = fetchFromGitHub {
owner = "turbot";
repo = "steampipe";
rev = "v${version}";
sha256 = "sha256-Hg9GvHB2eTcOUUC/WLpks9TUWivoV6KxXcWWBWne5Lg=";
};
vendorSha256 = "sha256-akMUJcAoUGHz3FzDJlMUYtHXrtvU0JMiRfqhTm4IEpA=";
# 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 ];
};
}