prometheus-solaredge-exporter: init at 0.1.5
This commit is contained in:
parent
98dfd23f8b
commit
513920a996
46
pkgs/by-name/pr/prometheus-solaredge-exporter/package.nix
Normal file
46
pkgs/by-name/pr/prometheus-solaredge-exporter/package.nix
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildGoModule,
|
||||||
|
fetchFromGitHub,
|
||||||
|
nix-update-script,
|
||||||
|
versionCheckHook,
|
||||||
|
}:
|
||||||
|
buildGoModule (finalAttrs: {
|
||||||
|
pname = "prometheus-solaredge-exporter";
|
||||||
|
version = "0.1.5";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "paepckehh";
|
||||||
|
repo = "solaredge_exporter";
|
||||||
|
tag = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-Aw6rMXE0jgqdUScQcFplNnpglwl13BRdTEN1gMQJSd0=";
|
||||||
|
};
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
"-X=github.com/prometheus/common/version.BuildDate=1970-01-01T00:00:00Z"
|
||||||
|
"-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
|
||||||
|
"-X github.com/prometheus/common/version.Branch=master"
|
||||||
|
"-X github.com/prometheus/common/version.Revision=${finalAttrs.src.rev}"
|
||||||
|
"-X github.com/prometheus/common/version.Version=${finalAttrs.version}"
|
||||||
|
];
|
||||||
|
|
||||||
|
vendorHash = "sha256-ltCjuihbm0/bj2SPkiITTHzYmcQsX12xvt+OpYROivU=";
|
||||||
|
|
||||||
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||||
|
doInstallCheck = true;
|
||||||
|
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
|
||||||
|
versionCheckProgramArg = "--version";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
changelog = "https://github.com/paepckehh/solaredge_exporter/releases/tag/v${finalAttrs.version}";
|
||||||
|
homepage = "https://paepcke.de/solaredge_exporter";
|
||||||
|
description = "Prometheus exporter for solaredge solar inverter local tcp modbus interface";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
mainProgram = "solaredge_exporter";
|
||||||
|
maintainers = with lib.maintainers; [ paepcke ];
|
||||||
|
};
|
||||||
|
})
|
||||||
Loading…
x
Reference in New Issue
Block a user