nix/pkgs/grafana-plugins: init

This commit is contained in:
Luke Granger-Brown 2020-12-30 02:43:10 +00:00
parent 26e379dfb7
commit ca4f3c0013
2 changed files with 29 additions and 0 deletions

View file

@ -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)

View 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";
};
}