1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 ...
6}:
7buildGoModule (finalAttrs: {
8 pname = "jellyfin-exporter";
9 version = "1.3.8";
10
11 src = fetchFromGitHub {
12 owner = "rebelcore";
13 repo = "jellyfin_exporter";
14 tag = "v${finalAttrs.version}";
15 hash = "sha256-7fIrjcy6y/Ayj43WeuPNCx3uVJyl5Wf6bWs5ta2PpWc=";
16 };
17
18 # We need to patch the tests since we don't move the binary to `$GOPATH/bin`, but to `$out/bin` instead.
19 postPatch = ''
20 substituteInPlace jellyfin_exporter_test.go \
21 --replace-fail "GOPATH" "out"
22 '';
23
24 vendorHash = "sha256-JSOKDbefQyDLNy2y1oW7HUplQw8uhhOGZ+ueWyUYYQ0=";
25
26 meta = {
27 changelog = "https://github.com/rebelcore/jellyfin_exporter/blob/v${finalAttrs.version}/CHANGELOG.md";
28 description = "Jellyfin Media System metrics exporter for prometheus";
29 homepage = "https://github.com/rebelcore/jellyfin_exporter";
30 license = lib.licenses.asl20;
31 maintainers = with lib.maintainers; [ pyrox0 ];
32 mainProgram = "jellyfin_exporter";
33 };
34})