Merge pull request #59175 from jbgi/generic-prometheus
Expose prometheus generic builder.
This commit is contained in:
commit
65fa918adb
@ -2,8 +2,8 @@
|
||||
|
||||
let
|
||||
goPackagePath = "github.com/prometheus/prometheus";
|
||||
|
||||
generic = { version, sha256, ... }@attrs:
|
||||
in rec {
|
||||
buildPrometheus = { version, sha256, doCheck ? true, ... }@attrs:
|
||||
let attrs' = builtins.removeAttrs attrs ["version" "sha256"]; in
|
||||
buildGoPackage ({
|
||||
name = "prometheus-${version}";
|
||||
@ -17,8 +17,6 @@ let
|
||||
inherit sha256;
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
buildFlagsArray = let t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; in ''
|
||||
-ldflags=
|
||||
-X ${t}.Version=${version}
|
||||
@ -43,13 +41,13 @@ let
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
} // attrs');
|
||||
in rec {
|
||||
prometheus_1 = generic {
|
||||
|
||||
prometheus_1 = buildPrometheus {
|
||||
version = "1.8.2";
|
||||
sha256 = "088flpg3qgnj9afl9vbaa19v2s1d21yxy38nrlv5m7cxwy2pi5pv";
|
||||
};
|
||||
|
||||
prometheus_2 = generic {
|
||||
prometheus_2 = buildPrometheus {
|
||||
version = "2.6.0";
|
||||
sha256 = "1d9zwzs280pw9zspqwp7xx3ji04lfg2v9l5qhrfy3y633ghcmpxz";
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user