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" ];
|
|
|
|
|
2022-09-06 09:18:12 +00:00
|
|
|
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-09-06 09:18:12 +00:00
|
|
|
|
2022-07-29 19:22:24 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "AIO Prometheus Exporter for Sonarr, Radarr or Lidarr";
|
2024-03-19 02:14:51 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|