Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
71 lines
1.6 KiB
Nix
71 lines
1.6 KiB
Nix
{
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
lib,
|
|
makeWrapper,
|
|
nix-update-script,
|
|
powerpipe,
|
|
testers,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "powerpipe";
|
|
version = "1.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "turbot";
|
|
repo = "powerpipe";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-ou24M5S6GfrQxmcmESzhU52ZQqdb+1s2ExLBljM0RR0=";
|
|
};
|
|
|
|
vendorHash = "sha256-CveNSjZCdV8YEis0PNP8F9+ht+Q9vz0VWCEp9lCJsTs=";
|
|
proxyVendor = true;
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
makeWrapper
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${version}"
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
checkFlags =
|
|
let
|
|
skippedTests = [
|
|
# test fails in the original github.com/turbot/powerpipe project as well
|
|
"TestGetAsSnapshotPropertyMap/card"
|
|
];
|
|
in
|
|
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/powerpipe \
|
|
--set-default POWERPIPE_UPDATE_CHECK false \
|
|
--set-default POWERPIPE_TELEMETRY none
|
|
'';
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion {
|
|
command = "${lib.getExe powerpipe} --version";
|
|
package = powerpipe;
|
|
version = "v${version}";
|
|
};
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://github.com/turbot/powerpipe/blob/v${version}/CHANGELOG.md";
|
|
description = "Dynamically query your cloud, code, logs & more with SQL";
|
|
homepage = "https://powerpipe.io/";
|
|
license = lib.licenses.agpl3Only;
|
|
mainProgram = "powerpipe";
|
|
maintainers = with lib.maintainers; [ weitzj ];
|
|
};
|
|
}
|