mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
grafana: made phantomjs2 optional
On servers especially, phantomjs2 pulls graphical dependencies which is unecessary. This pathes enable the package to be linked/installed without phantomjs2. Phantomjs2 is disabled by default since it has been deprecated in grafana https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/
This commit is contained in:
parent
d5db5d12aa
commit
9f0014b6f2
@ -59,7 +59,18 @@
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para />
|
||||
<para>
|
||||
Grafana is now built without support for phantomjs by default. Phantomjs support has been
|
||||
<link xlink:href="https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/">deprecated in Grafana</link>
|
||||
and the <package>phantomjs</package> project is
|
||||
<link xlink:href="https://github.com/ariya/phantomjs/issues/15344#issue-302015362">currently unmaintained</link>.
|
||||
It can still be enabled by providing <literal>phantomJsSupport = true</literal> to the package instanciation:
|
||||
<programlisting>{
|
||||
services.grafana.package = pkgs.grafana.overrideAttrs (oldAttrs: rec {
|
||||
phantomJsSupport = false;
|
||||
});
|
||||
}</programlisting>
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
@ -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
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user