9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
45 lines
1.4 KiB
Nix
45 lines
1.4 KiB
Nix
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "steampipe";
|
|
version = "0.20.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "turbot";
|
|
repo = "steampipe";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-neHcLO64Ik61P6R6rFL3kuKi9qRQ64f1xEqUrgUKeCg=";
|
|
};
|
|
|
|
vendorHash = "sha256-VuUzo+afUazXH7jaR4Qm5Kfr6qiyHqdGLJWS3MX8oOA=";
|
|
proxyVendor = true;
|
|
|
|
patchPhase = ''
|
|
runHook prePatch
|
|
# Patch test that relies on looking up homedir in user struct to prefer ~
|
|
substituteInPlace pkg/steampipeconfig/shared_test.go \
|
|
--replace 'filehelpers "github.com/turbot/go-kit/files"' "" \
|
|
--replace 'filepaths.SteampipeDir, _ = filehelpers.Tildefy("~/.steampipe")' 'filepaths.SteampipeDir = "~/.steampipe"';
|
|
runHook postPatch
|
|
'';
|
|
|
|
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 ];
|
|
changelog = "https://github.com/turbot/steampipe/blob/v${version}/CHANGELOG.md";
|
|
};
|
|
}
|