prometheus: Split source definition to separate file

This commit is contained in:
Jonathan Davies
2025-12-17 09:38:45 +00:00
parent f46b9643cc
commit 648378b167
2 changed files with 18 additions and 7 deletions
+12 -7
View File
@@ -1,6 +1,5 @@
{
stdenv,
buildPackages,
lib,
go,
buildGoModule,
@@ -33,14 +32,17 @@
}:
let
source = import ./source.nix;
inherit (source) version vendorHash;
pname = "prometheus";
version = "3.8.0";
src = fetchFromGitHub {
owner = "prometheus";
repo = "prometheus";
tag = "v${version}";
hash = "sha256-bitRDX1oymFfzvQVYL31BON6UBfQYnqjZefQKc+yXx0=";
hash = source.hash;
};
assets = buildNpmPackage {
@@ -49,7 +51,7 @@ let
src = "${src}/web/ui";
npmDepsHash = "sha256-Uq7vikiYLqhRQNCpB49aMJgAE/uK4Mst/Iz6W+hdxBw=";
npmDepsHash = source.npmDepsHash;
patches = [
# Disable old React app as it depends on deprecated create-react-apps
@@ -79,7 +81,12 @@ let
};
in
buildGoModule (finalAttrs: {
inherit pname version src;
inherit
pname
version
vendorHash
src
;
outputs = [
"out"
@@ -87,8 +94,6 @@ buildGoModule (finalAttrs: {
"cli"
];
vendorHash = "sha256-V+qLxjqGOaT1veEwtklqcS7iO31ufvDHBA9DbZLzDiE=";
excludedPackages = [
"documentation/prometheus-mixin"
"internal/tools"
+6
View File
@@ -0,0 +1,6 @@
{
version = "3.8.0";
hash = "sha256-hRuZxwPPDLxQvy5MPKEyfmanNabcSjLRO+XbNKugPtk=";
npmDepsHash = "sha256-pOHEchYVDv7A/3v37hpN60kK620SgQduhVIn6GMyOLM=";
vendorHash = "sha256-5wDaG01vcTtGzrS/S33U5XWXoSWM+N9z3dzXZlILxD8=";
}