blob: 353d2a5ba493268e0ea32c5ea5029949163d74ac (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
{
buildGoModule,
fetchFromGitHub,
installShellFiles,
lib,
makeWrapper,
nix-update-script,
powerpipe,
testers,
}:
buildGoModule rec {
pname = "powerpipe";
version = "0.4.0";
src = fetchFromGitHub {
owner = "turbot";
repo = "powerpipe";
rev = "refs/tags/v${version}";
hash = "sha256-KJ024dIU0GmeHCFa/pbyFIA+LitaudHC+NBGg8yNWxM=";
};
vendorHash = "sha256-XALFXUeWrS4nt+ONToCfYXvLWuk7ZhLWvJidnATcWtM=";
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 ];
};
}
|