{ lib, buildGoModule, fetchFromGitHub, ... }: buildGoModule (finalAttrs: { pname = "jellyfin-exporter"; version = "1.3.8"; src = fetchFromGitHub { owner = "rebelcore"; repo = "jellyfin_exporter"; tag = "v${finalAttrs.version}"; hash = "sha256-7fIrjcy6y/Ayj43WeuPNCx3uVJyl5Wf6bWs5ta2PpWc="; }; # We need to patch the tests since we don't move the binary to `$GOPATH/bin`, but to `$out/bin` instead. postPatch = '' substituteInPlace jellyfin_exporter_test.go \ --replace-fail "GOPATH" "out" ''; vendorHash = "sha256-JSOKDbefQyDLNy2y1oW7HUplQw8uhhOGZ+ueWyUYYQ0="; meta = { changelog = "https://github.com/rebelcore/jellyfin_exporter/blob/v${finalAttrs.version}/CHANGELOG.md"; description = "Jellyfin Media System metrics exporter for prometheus"; homepage = "https://github.com/rebelcore/jellyfin_exporter"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ pyrox0 ]; mainProgram = "jellyfin_exporter"; }; })