Skip to content

Commit 7cc85f9

Browse files
committed
pgscv: init at 0.13.0
1 parent be3ccfb commit 7cc85f9

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

pkgs/by-name/pg/pgscv/package.nix

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
lib,
3+
buildGoModule,
4+
fetchFromGitHub,
5+
}:
6+
7+
buildGoModule rec {
8+
pname = "pgscv";
9+
version = "0.13.0";
10+
11+
src = fetchFromGitHub {
12+
owner = "CHERTS";
13+
repo = "pgscv";
14+
tag = "v${version}";
15+
hash = "sha256-6qhJZHyVtEI4+pqi0dgagDC2RaISV9g/ygrezJO57Sk=";
16+
};
17+
18+
vendorHash = "sha256-KahDpLwk+6KXaIfvjr7+nkFuEV4Dw3pyshkJ5XUEdUg=";
19+
20+
ldflags = [
21+
"-X=main.appName=pgscv"
22+
"-X=main.gitTag=${src.tag}"
23+
"-X=main.gitCommit=${src.tag}"
24+
"-X=main.gitBranch=${src.tag}"
25+
];
26+
27+
# tests rely on a pretty complex Postgres setup
28+
doCheck = false;
29+
30+
postInstall = ''
31+
mv $out/bin/{cmd,pgscv}
32+
'';
33+
34+
meta = {
35+
description = "PgSCV is a PostgreSQL ecosystem metrics collector";
36+
homepage = "https://github.com/CHERTS/pgscv/";
37+
changelog = "https://github.com/CHERTS/pgscv/releases/${version}";
38+
license = lib.licenses.bsd3;
39+
platforms = lib.platforms.linux;
40+
maintainers = with lib.maintainers; [ k900 ];
41+
mainProgram = "pgscv";
42+
};
43+
}

0 commit comments

Comments
 (0)