nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 buildGoModule,
3 fetchFromGitHub,
4 lib,
5 nix-update-script,
6}:
7
8buildGoModule rec {
9 pname = "cloudflare-exporter";
10 version = "0.3.0";
11
12 src = fetchFromGitHub {
13 owner = "lablabs";
14 repo = pname;
15 tag = "cloudflare-exporter-${version}";
16 sha256 = "sha256-rfnAGBuY6HoWzZkYp9u+Ee3xhWb6Se2RkkSIWBvjUYY=";
17 };
18
19 vendorHash = "sha256-v8qw4Cofw0vOrEg5oo9YtRabXMrjpQ+tI4l+A43JllA=";
20
21 passthru = {
22 updateScript = nix-update-script {
23 extraArgs = [
24 "--version-regex"
25 "cloudflare-exporter-(.*)"
26 ];
27 };
28 };
29
30 meta = {
31 description = "Prometheus Cloudflare Exporter";
32 mainProgram = "cloudflare-exporter";
33 homepage = "https://github.com/lablabs/cloudflare-exporter";
34 license = lib.licenses.asl20;
35 maintainers = with lib.maintainers; [ bbigras ];
36 platforms = lib.platforms.linux;
37 };
38}