grafana: 5.1.4 -> 5.2.0, replace hard coded version (#42653)
Replaced the hard coded version with the packaged version and updated the source URL which changed with the latest release.
This commit is contained in:
parent
66350c0e18
commit
14ca98e51e
|
@ -1,7 +1,7 @@
|
|||
{ lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomjs2 }:
|
||||
|
||||
buildGoPackage rec {
|
||||
version = "5.1.4";
|
||||
version = "5.2.0";
|
||||
name = "grafana-${version}";
|
||||
goPackagePath = "github.com/grafana/grafana";
|
||||
|
||||
|
@ -9,15 +9,21 @@ buildGoPackage rec {
|
|||
rev = "v${version}";
|
||||
owner = "grafana";
|
||||
repo = "grafana";
|
||||
sha256 = "09bpijjm7cm4p5ci04ihq55fy5zwpdcld791vdpk6m91ixpab2zc";
|
||||
sha256 = "0ybnah8ziyawmmwrvm327xvr6cjbzgblf5f7qwmz6lk7irh8d9ra";
|
||||
};
|
||||
|
||||
srcStatic = fetchurl {
|
||||
url = "https://grafana-releases.s3.amazonaws.com/release/grafana-${version}.linux-x64.tar.gz";
|
||||
sha256 = "0ygfq4my3bdqs942l31w0695a6rwyrwq7jr23g0vgaqadamgbgkg";
|
||||
url = "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-${version}.linux-amd64.tar.gz";
|
||||
sha256 = "0ir9dhwm6h4673ic4pwhfwmg6jz8m8ia98cjkr9b4c68yrs1dv5j";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pkg/cmd/grafana-server/main.go \
|
||||
--replace 'var version = "5.0.0"' 'var version = "${version}"'
|
||||
'';
|
||||
|
||||
preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
|
||||
|
||||
postInstall = ''
|
||||
tar -xvf $srcStatic
|
||||
mkdir -p $bin/share/grafana
|
||||
|
|
Loading…
Reference in New Issue