diff --git a/nixos/doc/manual/release-notes/rl-2009.xml b/nixos/doc/manual/release-notes/rl-2009.xml index d07b7cf49c3..2c407a5130c 100644 --- a/nixos/doc/manual/release-notes/rl-2009.xml +++ b/nixos/doc/manual/release-notes/rl-2009.xml @@ -59,7 +59,18 @@ - + + Grafana is now built without support for phantomjs by default. Phantomjs support has been + deprecated in Grafana + and the phantomjs project is + currently unmaintained. + It can still be enabled by providing phantomJsSupport = true to the package instanciation: +{ + services.grafana.package = pkgs.grafana.overrideAttrs (oldAttrs: rec { + phantomJsSupport = false; + }); +} + diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index cbb13074afc..a4a4796a8cd 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomjs2 }: +{ lib, buildGoPackage, fetchurl, fetchFromGitHub, phantomJsSupport ? false, phantomjs2 ? null }: buildGoPackage rec { pname = "grafana"; @@ -31,6 +31,7 @@ buildGoPackage rec { tar -xvf $srcStatic mkdir -p $bin/share/grafana mv grafana-*/{public,conf,tools} $bin/share/grafana/ + '' + lib.optionalString phantomJsSupport '' ln -sf ${phantomjs2}/bin/phantomjs $bin/share/grafana/tools/phantomjs/phantomjs '';