diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index 834af7984e..b49108bf44 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -17,4 +17,5 @@ pomerium = import ./pomerium args; envoy = import ./envoy args; deluge = import ./deluge args; + grafana-plugins = import ./grafana-plugins args; } // (import ./heptapod-runner.nix args) diff --git a/nix/pkgs/grafana-plugins/default.nix b/nix/pkgs/grafana-plugins/default.nix new file mode 100644 index 0000000000..62a2104932 --- /dev/null +++ b/nix/pkgs/grafana-plugins/default.nix @@ -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"; + }; +}