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