mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
dovecot_exporter: migrate to buildGoModule
Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
This commit is contained in:
parent
38dc5f0137
commit
14f649e893
5 changed files with 39 additions and 130 deletions
38
pkgs/by-name/do/dovecot_exporter/package.nix
Normal file
38
pkgs/by-name/do/dovecot_exporter/package.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, nixosTests
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "dovecot_exporter";
|
||||
version = "0.1.3-unstable-2019-07-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kumina";
|
||||
repo = "dovecot_exporter";
|
||||
rev = "7ef79118ba619ff078594837377189477a4d059f";
|
||||
sha256 = "sha256-qJbIBSfHYgFztuivuNjleDa+Bx0KC4OklCh3IvK2XFI=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-+B8sROL1h6ElBfAUBT286yJF9m9zoRvMOrf0z2SVCj0=";
|
||||
|
||||
patches = [
|
||||
# Migrate the project to Go modules
|
||||
# https://github.com/kumina/dovecot_exporter/pull/23
|
||||
(fetchpatch {
|
||||
url = "https://github.com/kumina/dovecot_exporter/commit/b5184dd99cf8c79facf20cea281828d302327665.patch";
|
||||
sha256 = "sha256-OcdI1fJ/wumDI/wk5PQVot9+Gw/PnsiwgJY7dcRyEsc=";
|
||||
})
|
||||
];
|
||||
|
||||
passthru.tests = { inherit (nixosTests.prometheus-exporters) dovecot; };
|
||||
|
||||
meta = {
|
||||
inherit (src.meta) homepage;
|
||||
description = "Prometheus metrics exporter for Dovecot";
|
||||
mainProgram = "dovecot_exporter";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ willibutz globin ];
|
||||
};
|
||||
}
|
|
@ -1,102 +0,0 @@
|
|||
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
|
||||
[
|
||||
{
|
||||
goPackagePath = "github.com/alecthomas/template";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/alecthomas/template";
|
||||
rev = "a0175ee3bccc567396460bf5acd36800cb10c49c";
|
||||
sha256 = "0qjgvvh26vk1cyfq9fadyhfgdj36f1iapbmr5xp6zqipldz8ffxj";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/alecthomas/units";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/alecthomas/units";
|
||||
rev = "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a";
|
||||
sha256 = "1j65b91qb9sbrml9cpabfrcf07wmgzzghrl7809hjjhrmbzri5bl";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/beorn7/perks";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/beorn7/perks";
|
||||
rev = "3a771d992973f24aa725d07868b467d1ddfceafb";
|
||||
sha256 = "1l2lns4f5jabp61201sh88zf3b0q793w4zdgp9nll7mmfcxxjif3";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/gogo/protobuf";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/gogo/protobuf";
|
||||
rev = "4aa4cc277ae58d2fab6cfe51dd17df5dceaf457d";
|
||||
sha256 = "009z6rpivyakgsxs0zkm94c9i7l65hcw2ljvah94wq3y6v6j47gs";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/golang/protobuf";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/golang/protobuf";
|
||||
rev = "0f2620f554cf5c8e281a2eb655a035f5a0f6dc90";
|
||||
sha256 = "0lxngq1a8cnsy6dlr6gi8pjv3fir2wiw76qh075pa9g02h7ywhv3";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/matttproud/golang_protobuf_extensions";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/matttproud/golang_protobuf_extensions";
|
||||
rev = "c12348ce28de40eed0136aa2b644d0ee0650e56c";
|
||||
sha256 = "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/prometheus/client_golang";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/prometheus/client_golang";
|
||||
rev = "b5bfa0eb2c8d46bd91dc58271e973c5f0bbebcfa";
|
||||
sha256 = "1msxzkdgi0ing4ddmp0s4qrf267n6ylafw9mbz5yrr7spb1dgxgk";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/prometheus/client_model";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/prometheus/client_model";
|
||||
rev = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f";
|
||||
sha256 = "04psf81l9fjcwascsys428v03fx4fi894h7fhrj2vvcz723q57k0";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/prometheus/common";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/prometheus/common";
|
||||
rev = "c7de2306084e37d54b8be01f3541a8464345e9a5";
|
||||
sha256 = "11dqfm2d0m4sjjgyrnayman96g59x2apmvvqby9qmww2qj2k83ig";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/prometheus/procfs";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/prometheus/procfs";
|
||||
rev = "05ee40e3a273f7245e8777337fc7b46e533a9a92";
|
||||
sha256 = "0f6fnczxa42b9rys2h3l0m8fy3x5hrhaq707vq0lbx5fcylw8lis";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "gopkg.in/alecthomas/kingpin.v2";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://gopkg.in/alecthomas/kingpin.v2";
|
||||
rev = "947dcec5ba9c011838740e680966fd7087a71d0d";
|
||||
sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r";
|
||||
};
|
||||
}
|
||||
]
|
|
@ -1,27 +0,0 @@
|
|||
{ lib, buildGoPackage, fetchFromGitHub, nixosTests }:
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "dovecot_exporter";
|
||||
version = "0.1.3";
|
||||
|
||||
goPackagePath = "github.com/kumina/dovecot_exporter";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kumina";
|
||||
repo = "dovecot_exporter";
|
||||
rev = version;
|
||||
sha256 = "1lnxnnm45fhcyv40arcvpiiibwdnxdwhkf8sbjpifx1wspvphcj9";
|
||||
};
|
||||
|
||||
goDeps = ./dovecot-exporter-deps.nix;
|
||||
|
||||
passthru.tests = { inherit (nixosTests.prometheus-exporters) dovecot; };
|
||||
|
||||
meta = with lib; {
|
||||
inherit (src.meta) homepage;
|
||||
description = "Prometheus metrics exporter for Dovecot";
|
||||
mainProgram = "dovecot_exporter";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ willibutz globin ];
|
||||
};
|
||||
}
|
|
@ -1065,6 +1065,7 @@ mapAliases ({
|
|||
probe-rs-cli = throw "probe-rs-cli is now part of the probe-rs package"; # Added 2023-07-03
|
||||
processing3 = throw "'processing3' has been renamed to/replaced by 'processing'"; # Converted to throw 2023-09-10
|
||||
prometheus-dmarc-exporter = dmarc-metrics-exporter; # added 2022-05-31
|
||||
prometheus-dovecot-exporter = dovecot_exporter; # Added 2024-06-10
|
||||
prometheus-openvpn-exporter = throw "'prometheus-openvpn-exporter' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-12-23
|
||||
prometheus-speedtest-exporter = throw "prometheus-speedtest-exporter was removed as unmaintained"; # Added 2023-07-31
|
||||
protobuf3_17 = throw "protobuf3_17 does not receive updates anymore and has been removed"; # Added 2023-05-21
|
||||
|
|
|
@ -26342,7 +26342,6 @@ with pkgs;
|
|||
prometheus-consul-exporter = callPackage ../servers/monitoring/prometheus/consul-exporter.nix { };
|
||||
prometheus-dcgm-exporter = callPackage ../servers/monitoring/prometheus/dcgm-exporter { };
|
||||
prometheus-dnsmasq-exporter = callPackage ../servers/monitoring/prometheus/dnsmasq-exporter.nix { };
|
||||
prometheus-dovecot-exporter = callPackage ../servers/monitoring/prometheus/dovecot-exporter.nix { };
|
||||
prometheus-domain-exporter = callPackage ../servers/monitoring/prometheus/domain-exporter.nix { };
|
||||
prometheus-fastly-exporter = callPackage ../servers/monitoring/prometheus/fastly-exporter.nix { };
|
||||
prometheus-flow-exporter = callPackage ../servers/monitoring/prometheus/flow-exporter.nix { };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue