Merge pull request #88242 from JJJollyjim/grafana-7.0.0

grafana: 6.7.3 -> 7.0.0
This commit is contained in:
WilliButz 2020-05-23 20:39:10 +02:00 committed by GitHub
commit 10b6f23bb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 11 deletions

View file

@ -452,6 +452,14 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
In such cases, you most likely want to create a <literal>10-*.link</literal> file through <xref linkend="opt-systemd.network.links"/> and set both name and MAC Address / MTU there.
</para>
</listitem>
<listitem>
<para>
Grafana received a major update to version 7.x. A plugin is now needed for
image rendering support, and plugins must now be signed by default. More
information can be found
<link xlink:href="https://grafana.com/docs/grafana/latest/installation/upgrading/#upgrading-to-v7-0">in the Grafana documentation</link>.
</para>
</listitem>
</itemizedlist>
</section>
</section>

View file

@ -1,10 +1,8 @@
{ lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomJsSupport ? false, phantomjs2 ? null }:
{ lib, buildGoModule, fetchurl, fetchFromGitHub }:
buildGoPackage rec {
buildGoModule rec {
pname = "grafana";
version = "6.7.3";
goPackagePath = "github.com/grafana/grafana";
version = "7.0.0";
excludedPackages = [ "release_publisher" ];
@ -12,27 +10,25 @@ buildGoPackage rec {
rev = "v${version}";
owner = "grafana";
repo = "grafana";
sha256 = "14yrfrn59r3mxbkhs7mg7nlhnvvrmq959r8w4aj6m7wgr32jj8wl";
sha256 = "1xicqsn8qg2wwp7p3p3643vqvpp6fbzpx1x7w0mgv9l2va9px8mq";
};
srcStatic = fetchurl {
url = "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz";
sha256 = "17h70h6cz1bdhczjqa68kxzfm4vi95zdnqzah8hcjr7rwnx874kr";
sha256 = "1x6b61rsflj9dbj0r9wj1wgp4lqwa1q21s3x7ws50scqhq1m3xmk";
};
vendorSha256 = "00xvpxhnvxdf030978paywl794mlmgqzd94b64hh67946acnbjcl";
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 $out/share/grafana
mv grafana-*/{public,conf,tools} $out/share/grafana/
'' + lib.optionalString phantomJsSupport ''
ln -sf ${phantomjs2}/bin/phantomjs $out/share/grafana/tools/phantomjs/phantomjs
'';
meta = with lib; {