@cryptotaxi247 / infra-1 / commits / f7c75c04

prometheus postgres-exporter: update to 0.9.0

Revert when updating to 21.05

Eelco Dolstra committed May 30, 2021 at 02:27 UTC f7c75c043f5b14e3335442de9071b3698d9c280c
2 files changed +34 -1
delft/network.nix
+8 -1
@@ -1,6 +1,10 @@
1 flakes:
2
3 let
4 + networkoverlay = self: super: {
5 + prometheus-postgres-exporter = self.callPackage ./prometheus/postgres-exporter.nix {};
6 + };
7 +
8 makeMac = { ip, extra }: {
9 deployment = {
10 targetHost = ip;
@@ -47,7 +51,10 @@ in {
51 flakes.dwarffs.nixosModules.dwarffs
52 { system.configurationRevision = flakes.self.rev
53 or (throw "Cannot deploy from an unclean source tree!");
50 - nixpkgs.overlays = [ flakes.nix.overlay ];
54 + nixpkgs.overlays = [
55 + flakes.nix.overlay
56 + networkoverlay
57 + ];
58 nix.registry.nixpkgs.flake = flakes.nixpkgs;
59 nix.nixPath = [ "nixpkgs=${flakes.nixpkgs}" ];
60 }
delft/prometheus/postgres-exporter.nix new
+26
@@ -0,0 +1,26 @@
1 +{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
2 +
3 +buildGoModule rec {
4 + pname = "postgres_exporter";
5 + version = "0.9.0";
6 +
7 + src = fetchFromGitHub {
8 + owner = "wrouesnel";
9 + repo = "postgres_exporter";
10 + rev = "v${version}";
11 + sha256 = "sha256-Kv+sjqhlmH36L4YvDuGYODR/eTHA2TKQ6IUCXAiItyo=";
12 + };
13 +
14 + vendorSha256 = "sha256-yMcoUl9NsiiZQyEHlLu79DzIyl6BbhLZ/xNFavaGrEs=";
15 +
16 + doCheck = true;
17 +
18 + passthru.tests = { inherit (nixosTests.prometheus-exporters) postgres; };
19 +
20 + meta = with lib; {
21 + inherit (src.meta) homepage;
22 + description = "A Prometheus exporter for PostgreSQL";
23 + license = licenses.asl20;
24 + maintainers = with maintainers; [ fpletz globin willibutz ma27 ];
25 + };
26 +}