From 51194934f276d6df9835654175f8363fbeb4bdcf Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Wed, 27 Aug 2025 20:45:48 +0200 Subject: refactor: pin prometheus-sql-exporter with npins --- nixos/npins/sources.json | 15 +++++++++++++++ nixos/shared/prometheus-sql-exporter/default.nix | 18 ++++++------------ 2 files changed, 21 insertions(+), 12 deletions(-) (limited to 'nixos') diff --git a/nixos/npins/sources.json b/nixos/npins/sources.json index 826b2a9..cde94e0 100644 --- a/nixos/npins/sources.json +++ b/nixos/npins/sources.json @@ -105,6 +105,21 @@ "name": "nixpkgs-unstable", "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre832020.6b4955211758/nixexprs.tar.xz", "hash": "128piyf6sw0r07bxhix6i998h30zqqgaz1sknzrgy6yvh8jgawaz" + }, + "prometheus-sql-exporter": { + "type": "GitRelease", + "repository": { + "type": "Git", + "url": "https://github.com/burningalchemist/sql_exporter" + }, + "pre_releases": false, + "version_upper_bound": null, + "release_prefix": null, + "submodules": false, + "version": "0.17.1", + "revision": "5bd21bb0bc14a65d2b2e883f23c9acc338ad96d7", + "url": null, + "hash": "09vlgqhrdc5cfgbx7fz98vbj7cw1fpq35q7xskrdj7k5z9fcahq0" } }, "version": 5 diff --git a/nixos/shared/prometheus-sql-exporter/default.nix b/nixos/shared/prometheus-sql-exporter/default.nix index 81f1660..4a08ff6 100644 --- a/nixos/shared/prometheus-sql-exporter/default.nix +++ b/nixos/shared/prometheus-sql-exporter/default.nix @@ -1,20 +1,14 @@ { lib, buildGoModule, - fetchFromGitHub, }: - -buildGoModule rec { +let + sources = import ; +in +buildGoModule { pname = "sql_exporter"; - version = "0.17.1"; - - src = fetchFromGitHub { - owner = "burningalchemist"; - repo = pname; - rev = version; - sha256 = "sha256-AEPFXPplHtny1P3gMvB1gbMj10bpu9PXc6ywliF+dCc="; - }; - + version = sources.prometheus-sql-exporter.version; + src = sources.prometheus-sql-exporter; vendorHash = "sha256-KFWDqbdbXvgEtz1nlasWrvIckpzasUdzbb+AKfXmYf8="; meta = with lib; { -- cgit v1.2.3