nixpkgs/pkgs/tools/misc/steampipe/default.nix

41 lines
1.0 KiB
Nix
Raw Normal View History

2021-10-13 21:20:33 +01:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2021-10-12 09:27:24 +01:00
buildGoModule rec {
pname = "steampipe";
2022-01-29 06:57:31 +00:00
version = "0.12.2";
2021-10-12 09:27:24 +01:00
src = fetchFromGitHub {
owner = "turbot";
repo = "steampipe";
rev = "v${version}";
2022-01-29 06:57:31 +00:00
sha256 = "sha256-xLw3y9DYkei0MoErsMpSDhEK73lK9b13st+DqHvvhys=";
2021-10-12 09:27:24 +01:00
};
2022-01-22 07:44:37 +00:00
vendorSha256 = "sha256-ikmcayOy87u6XMYjxxzFv35Rlp9oTteEKFOPr/+xc2Y=";
2021-10-12 09:27:24 +01:00
# tests are failing for no obvious reasons
doCheck = false;
2021-10-13 21:20:33 +01:00
nativeBuildInputs = [ installShellFiles ];
2021-10-12 09:27:24 +01:00
ldflags = [
"-s"
"-w"
];
2021-10-13 21:20:33 +01:00
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)
'';
2021-10-12 09:27:24 +01:00
meta = with lib; {
homepage = "https://steampipe.io/";
description = "select * from cloud;";
license = licenses.agpl3;
maintainers = with maintainers; [ hardselius ];
};
}