1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 nixosTests,
6}:
7
8buildGoModule rec {
9 pname = "process-exporter";
10 version = "0.8.7";
11
12 src = fetchFromGitHub {
13 owner = "ncabatoff";
14 repo = pname;
15 rev = "v${version}";
16 sha256 = "sha256-dxXBhrZdYM+mH73K/cdaSmfzbzZaPJYCTzcfXGYMlyY=";
17 };
18
19 vendorHash = "sha256-3uhwP8WgZ+zmP6Ex1xcQIj/qGoAot/YC3Vu+leMqEQ4=";
20
21 postPatch = ''
22 substituteInPlace proc/read_test.go --replace /bin/cat cat
23 '';
24
25 doCheck = true;
26
27 passthru.tests = { inherit (nixosTests.prometheus-exporters) process; };
28
29 meta = with lib; {
30 description = "Prometheus exporter that mines /proc to report on selected processes";
31 homepage = "https://github.com/ncabatoff/process-exporter";
32 license = licenses.mit;
33 maintainers = with maintainers; [ _1000101 ];
34 platforms = platforms.linux;
35 };
36}