nixpkgs/pkgs/servers/monitoring/prometheus/exportarr/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
905 B
Nix
Raw Normal View History

2022-07-29 19:22:24 +00:00
{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "exportarr";
2024-04-06 01:15:32 +00:00
version = "2.0.1";
2022-07-29 19:22:24 +00:00
src = fetchFromGitHub {
owner = "onedr0p";
repo = "exportarr";
rev = "v${version}";
2024-04-06 01:15:32 +00:00
hash = "sha256-A6G1b9hTGp35ZHsDaMAZdH0LkkEyXCWoV6e5Bo3UqI4=";
2022-07-29 19:22:24 +00:00
};
2024-04-06 01:15:32 +00:00
vendorHash = "sha256-8MrS/BMSjyWbBM8jVQYDsvLLaolgbP22Vp2PRX33Kfw=";
2022-07-29 19:22:24 +00:00
subPackages = [ "cmd/exportarr" ];
CGO_ENABLE = 0;
ldflags = [ "-s" "-w" ];
2022-07-29 19:22:24 +00:00
tags = lib.optionals stdenv.isLinux [ "netgo" ];
2023-05-01 09:24:59 +00:00
preCheck = ''
# Run all tests.
unset subPackages
'';
2022-07-29 19:22:24 +00:00
meta = with lib; {
description = "AIO Prometheus Exporter for Sonarr, Radarr or Lidarr";
mainProgram = "exportarr";
2022-07-29 19:22:24 +00:00
homepage = "https://github.com/onedr0p/exportarr";
changelog = "https://github.com/onedr0p/exportarr/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ azahi ];
};
}