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

73 lines
2.2 KiB
Nix
Raw Normal View History

2020-12-30 02:43:10 +00:00
{ pkgs, ... }:
2020-12-30 03:30:24 +00:00
with pkgs;
2020-12-30 02:43:10 +00:00
let
2020-12-30 03:30:24 +00:00
packageGrafanaPlugin = { pname, version, sha256, meta ? {}, ... }@args:
stdenv.mkDerivation {
2020-12-30 02:43:10 +00:00
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"
'';
2020-12-30 03:30:24 +00:00
meta = meta // {
homepage = "https://grafana.com/grafana/plugins/${pname}";
};
} // (builtins.removeAttrs args [ "pname" "version" "sha256" "meta" ]);
2020-12-30 02:43:10 +00:00
in
{
grafana-piechart-panel = packageGrafanaPlugin {
pname = "grafana-piechart-panel";
version = "1.6.1";
sha256 = "sha256:0f6snd2p3hq3gqmbvc6rnjx97k3lagcfyw62lx2y0ah1z9wvz0pb";
2020-12-30 03:30:24 +00:00
meta = with lib; {
description = "Pie chart panel for Grafana";
license = licenses.asl20;
maintainers = with maintainers; [ lukegb ];
platforms = platforms.unix;
};
};
grafana-clock-panel = packageGrafanaPlugin {
pname = "grafana-clock-panel";
version = "1.1.1";
sha256 = "sha256:0fa4ajd64q9anz7xg6parqjp79lz9wdc761sxsi6wp7ypa1p5xja";
meta = with lib; {
description = "Clock panel for Grafana";
license = licenses.asl20;
maintainers = with maintainers; [ lukegb ];
platforms = platforms.unix;
};
};
grafana-worldmap-panel = packageGrafanaPlugin {
pname = "grafana-worldmap-panel";
version = "0.3.2";
sha256 = "sha256:00dfd87kwrq41wc95vnxgidyh4kjylqydx6xq9x5rxsp5z6hjq1h";
meta = with lib; {
description = "World Map panel for Grafana";
license = licenses.asl20;
maintainers = with maintainers; [ lukegb ];
platforms = platforms.unix;
};
};
grafana-polystat-panel = packageGrafanaPlugin {
pname = "grafana-polystat-panel";
version = "1.2.2";
sha256 = "sha256:1mzyg8mk1vap4x65xnqkw14nsrhv1v4nfq9b7sbkpb37rf31sr0x";
meta = with lib; {
description = "Hexagonal multi-stat panel for Grafana";
license = licenses.asl20;
maintainers = with maintainers; [ lukegb ];
platforms = platforms.unix;
};
2020-12-30 02:43:10 +00:00
};
}