3
0
Fork 0
forked from mirrors/nixpkgs

Expose prometheus generic builder.

So that people can easily try newer prometheus version
 in overlays:

 self: super: {
   prometheus_2 = (super.callPackage <nixpkgs/pkgs/servers/monitoring/prometheus> {}).generic {
     version = "2.8.1";
     sha256 = "0x8w0qdh4lcf19nmdlhvgzpy08c2a932d3k49cjwhi5npcsf858n";
     doCheck = false;
   };
 }
This commit is contained in:
Jean-Baptiste Giraudeau 2019-03-25 15:54:13 +01:00
parent 0c0954781e
commit 670359e8da
No known key found for this signature in database
GPG key ID: E96EF57FD501B961

View file

@ -2,8 +2,8 @@
let
goPackagePath = "github.com/prometheus/prometheus";
generic = { version, sha256, ... }@attrs:
in rec {
generic = { 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,7 +41,7 @@ let
platforms = platforms.unix;
};
} // attrs');
in rec {
prometheus_1 = generic {
version = "1.8.2";
sha256 = "088flpg3qgnj9afl9vbaa19v2s1d21yxy38nrlv5m7cxwy2pi5pv";