nixpkgs/pkgs/servers/monitoring/prometheus/exportarr/default.nix
2023-10-26 22:43:24 +00:00

40 lines
874 B
Nix

{ lib
, stdenv
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "exportarr";
version = "1.6.0";
src = fetchFromGitHub {
owner = "onedr0p";
repo = "exportarr";
rev = "v${version}";
hash = "sha256-jmvVhNaE0cVLHTLH6qKIi4ETr7Q8CTEhXPwzjWyfx5k=";
};
vendorHash = "sha256-AYuyOAU7T9YluX77zPu4o377L4wCQzVUrQunt0UIZlU=";
subPackages = [ "cmd/exportarr" ];
CGO_ENABLE = 0;
ldflags = [ "-s" "-w" ];
tags = lib.optionals stdenv.isLinux [ "netgo" ];
preCheck = ''
# Run all tests.
unset subPackages
'';
meta = with lib; {
description = "AIO Prometheus Exporter for Sonarr, Radarr or Lidarr";
homepage = "https://github.com/onedr0p/exportarr";
changelog = "https://github.com/onedr0p/exportarr/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ azahi ];
};
}