nix/pkgs/grafana-plugins: init
This commit is contained in:
parent
26e379dfb7
commit
ca4f3c0013
2 changed files with 29 additions and 0 deletions
|
@ -17,4 +17,5 @@
|
||||||
pomerium = import ./pomerium args;
|
pomerium = import ./pomerium args;
|
||||||
envoy = import ./envoy args;
|
envoy = import ./envoy args;
|
||||||
deluge = import ./deluge args;
|
deluge = import ./deluge args;
|
||||||
|
grafana-plugins = import ./grafana-plugins args;
|
||||||
} // (import ./heptapod-runner.nix args)
|
} // (import ./heptapod-runner.nix args)
|
||||||
|
|
28
nix/pkgs/grafana-plugins/default.nix
Normal file
28
nix/pkgs/grafana-plugins/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
packageGrafanaPlugin = { pname, version, sha256, ... }@args:
|
||||||
|
with pkgs; stdenv.mkDerivation rec {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
name = "${pname}-${version}.zip";
|
||||||
|
url = "https://grafana.com/api/plugins/${pname}/versions/${version}/download";
|
||||||
|
inherit sha256;
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ unzip ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir $out
|
||||||
|
cp -R * "$out"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
grafana-piechart-panel = packageGrafanaPlugin {
|
||||||
|
pname = "grafana-piechart-panel";
|
||||||
|
version = "1.6.1";
|
||||||
|
sha256 = "sha256:0f6snd2p3hq3gqmbvc6rnjx97k3lagcfyw62lx2y0ah1z9wvz0pb";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue