depot/nix/pkgs/grafana-plugins/default.nix

29 lines
672 B
Nix
Raw Normal View History

2020-12-30 02:43:10 +00:00
{ 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";
};
}