4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
28 lines
833 B
Nix
28 lines
833 B
Nix
{ lib, stdenv, buildGoPackage, fetchFromGitHub, nixosTests }:
|
|
|
|
buildGoPackage rec {
|
|
pname = "fritzbox-exporter";
|
|
version = "v1.0-32-g90fc0c5";
|
|
rev = "90fc0c572d3340803f7c2aafc4b097db7af1f871";
|
|
|
|
src = fetchFromGitHub {
|
|
inherit rev;
|
|
owner = "mxschmitt";
|
|
repo = "fritzbox_exporter";
|
|
sha256 = "08gcc60g187x1d14vh7n7s52zkqgj3fvg5v84i6dw55rmb6zzxri";
|
|
};
|
|
|
|
goPackagePath = "github.com/mxschmitt/fritzbox_exporter";
|
|
|
|
goDeps = ./fritzbox-exporter-deps.nix;
|
|
|
|
passthru.tests = { inherit (nixosTests.prometheus-exporters) fritzbox; };
|
|
|
|
meta = with lib; {
|
|
description = "Prometheus Exporter for FRITZ!Box (TR64 and UPnP)";
|
|
homepage = "https://github.com/ndecker/fritzbox_exporter";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ bachp flokli ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|