summaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-08-27 20:45:48 +0200
committerMartin Fischer <martin@push-f.com>2025-08-27 21:14:12 +0200
commit51194934f276d6df9835654175f8363fbeb4bdcf (patch)
tree152a85701993653d90e7601b7b3a33c6a484c37c /nixos
parent63e381fc495cc3ef7a4afd1265b2e9722d56d317 (diff)
refactor: pin prometheus-sql-exporter with npins
Diffstat (limited to 'nixos')
-rw-r--r--nixos/npins/sources.json15
-rw-r--r--nixos/shared/prometheus-sql-exporter/default.nix18
2 files changed, 21 insertions, 12 deletions
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 <top/npins>;
+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; {