From 2f853e410b351334f8450dc593f4f4c374a2aea6 Mon Sep 17 00:00:00 2001 From: Christian Simon Date: Tue, 31 Dec 2024 14:37:15 +0000 Subject: [PATCH] Add fronius-exporter --- flake.nix | 18 ++++++++++-------- pkgs/fronius-exporter/default.nix | 25 +++++++++++++++++++++++++ pkgs/tplink-switch-exporter/default.nix | 4 ++-- 3 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 pkgs/fronius-exporter/default.nix diff --git a/flake.nix b/flake.nix index 72239fa..83bb00a 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,8 @@ docker-machine = pkgs.callPackage ./pkgs/docker-machine { }; docker-machine-driver-hetzner = pkgs.callPackage ./pkgs/docker-machine-driver-hetzner { }; faillint = pkgs.callPackage ./pkgs/faillint { }; + fronius-exporter = pkgs.callPackage ./pkgs/fronius-exporter { }; + g810-led = pkgs.callPackage ./pkgs/g810-led { }; get-focused-x-screen = pkgs.callPackage ./pkgs/get-focused-x-screen { }; gimli-addr2line = pkgs.callPackage ./pkgs/gimli-addr2line { }; goda = pkgs.callPackage ./pkgs/goda { }; @@ -47,20 +49,19 @@ heatmiser-exporter = pkgs.callPackage ./pkgs/heatmiser-exporter { }; intel-gpu-exporter = pkgs.callPackage ./pkgs/intel-gpu-exporter { }; jsonnet-language-server = pkgs.callPackage ./pkgs/jsonnet-language-server { }; - miio = pkgs.callPackage ./pkgs/python-miio { }; mi-flora-exporter = pkgs.callPackage ./pkgs/mi-flora-exporter { }; + miio = pkgs.callPackage ./pkgs/python-miio { }; modularise = pkgs.callPackage ./pkgs/modularise { }; mtv-dl = pkgs.callPackage ./pkgs/mtv-dl { }; - g810-led = pkgs.callPackage ./pkgs/g810-led { }; nut-exporter = pkgs.callPackage ./pkgs/nut-exporter { }; orangepi-firmware = pkgs.callPackage ./pkgs/orangepi-firmware { }; phpspy = pkgs.callPackage ./pkgs/phpspy { }; + profilecli = pkgs.callPackage ./pkgs/profilecli { }; prometheus-node-exporter-restic = pkgs.callPackage ./pkgs/prometheus-node-exporter-restic { }; prometheus-node-exporter-smartmon = pkgs.callPackage ./pkgs/prometheus-node-exporter-smartmon { }; prometheus-node-exporter-zfs = pkgs.callPackage ./pkgs/prometheus-node-exporter-zfs { }; prometheus-snmp-exporter-config = pkgs.callPackage ./pkgs/prometheus-snmp-exporter-config { }; pyroscope = pkgs.callPackage ./pkgs/pyroscope { }; - profilecli = pkgs.callPackage ./pkgs/profilecli { }; sleepwatcher = pkgs.callPackage ./pkgs/sleepwatcher { }; tplink-switch-exporter = pkgs.callPackage ./pkgs/tplink-switch-exporter { }; tz-cli = pkgs.callPackage ./pkgs/tz-cli { }; @@ -149,6 +150,7 @@ format = "kexec-bundle"; }; + austin = pkgs.austin; benchstat = pkgs.benchstat; cert-updater = pkgs.cert-updater; @@ -159,6 +161,7 @@ docker-machine = pkgs.docker-machine; docker-machine-driver-hetzner = pkgs.docker-machine-driver-hetzner; faillint = pkgs.faillint; + fronius-exporter = pkgs.fronius-exporter; g810-led = pkgs.g810-led; get-focused-x-screen = pkgs.get-focused-x-screen; gimli-addr2line = pkgs.gimli-addr2line; @@ -171,26 +174,25 @@ kubernetes-1-29 = pkgs.kubernetes-1-29; kubernetes-1-30 = pkgs.kubernetes-1-30; kubernetes-1-31 = pkgs.kubernetes-1-31; - miio = pkgs.miio; mi-flora-exporter = pkgs.mi-flora-exporter; + miio = pkgs.miio; modularise = pkgs.modularise; mtv-dl = pkgs.mtv-dl; nut-exporter = pkgs.nut-exporter; orangepi-firmware = pkgs.orangepi-firmware; phpspy = pkgs.phpspy; + profilecli = pkgs.profilecli; prometheus-node-exporter-restic = pkgs.prometheus-node-exporter-restic; prometheus-node-exporter-smartmon = pkgs.prometheus-node-exporter-smartmon; prometheus-node-exporter-zfs = pkgs.prometheus-node-exporter-zfs; prometheus-snmp-exporter-config = pkgs.prometheus-snmp-exporter-config; pyroscope = pkgs.pyroscope; - profilecli = pkgs.profilecli; - sleepwatcher = pkgs.callPackage ./pkgs/sleepwatcher { }; - tplink-switch-exporter = pkgs.callPackage ./pkgs/tplink-switch-exporter { }; + sleepwatcher = pkgs.sleepwatcher; + tplink-switch-exporter = pkgs.tplink-switch-exporter; tz-cli = pkgs.tz-cli; vim-markdown-composer = pkgs.vim-markdown-composer; yasdi = pkgs.yasdi; yasdi-exporter = pkgs.yasdi-exporter; - }; } diff --git a/pkgs/fronius-exporter/default.nix b/pkgs/fronius-exporter/default.nix new file mode 100644 index 0000000..2d895ad --- /dev/null +++ b/pkgs/fronius-exporter/default.nix @@ -0,0 +1,25 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "fronius-exporter"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "simonswine"; + repo = "fronius-exporter"; + rev = "v${version}"; + hash = "sha256-ArWdH2G3e1XWZQ4XHJRI/o/sNdLQ/55uV6gARi/naHw="; + }; + + vendorHash = "sha256-PKdn+AhW9wIBgBN5uwtU41SgK1kD9d+B59cKPP7BGcs="; + + subPackages = [ "." ]; + + meta = with lib; { + homepage = "https://github.com/simonswine/fronius-exporter"; + license = licenses.asl20; + maintainers = with maintainers; [ simonswine ]; + platforms = platforms.unix; + }; +} + diff --git a/pkgs/tplink-switch-exporter/default.nix b/pkgs/tplink-switch-exporter/default.nix index c1824a9..e27086e 100644 --- a/pkgs/tplink-switch-exporter/default.nix +++ b/pkgs/tplink-switch-exporter/default.nix @@ -8,7 +8,7 @@ buildGoModule rec { owner = "simonswine"; repo = "tplink-switch-exporter"; rev = "v${version}"; - sha256 = "W6Z6WDn3r19ClVLoSuHQTXx1L1oUF2Jy4XApHGtTvXA="; + hash = "sha256-W6Z6WDn3r19ClVLoSuHQTXx1L1oUF2Jy4XApHGtTvXA="; }; vendorHash = "sha256-fZcUbCyJ9KXig+I7SX8+sKCXUTMDDpI3guJiBwbN/3Q="; @@ -19,7 +19,7 @@ buildGoModule rec { homepage = "https://github.com/simonswine/tplink-switch-exporter"; license = licenses.asl20; maintainers = with maintainers; [ simonswine ]; - platforms = platforms.linux; + platforms = platforms.unix; }; }