10 # Notes for the upgrade:
11 # * Download the tarball of the new version to use.
12 # * Replace new `package.json` here.
13 # * Update `version`+`hash` and rebuild.
16 pname = "grafana-image-renderer";
19 src = fetchFromGitHub {
21 repo = "grafana-image-renderer";
23 hash = "sha256-iTWkr7mruGda7CVz0L6puHeObnogXHfqjF9KAY+ExJg=";
26 offlineCache = fetchYarnDeps {
27 yarnLock = src + "/yarn.lock";
28 hash = "sha256-h4i27yNnVU+h5/oboAq6S4+dqjkvJ6TFqtljM3ffgTI=";
31 packageJSON = ./package.json;
51 install_path="$out/libexec/grafana-image-renderer"
52 mkdir -p $install_path
53 cp -R ../../node_modules $install_path
54 cp -R ./!(node_modules) $install_path
58 cat >$out/bin/grafana-image-renderer <<EOF
60 ${nodejs}/bin/node $install_path/build/app.js \$@
62 chmod +x $out/bin/grafana-image-renderer
68 homepage = "https://github.com/grafana/grafana-image-renderer";
69 description = "Grafana backend plugin that handles rendering of panels & dashboards to PNGs using headless browser (Chromium/Chrome)";
70 mainProgram = "grafana-image-renderer";
71 license = licenses.asl20;
72 maintainers = with maintainers; [ ma27 ];
73 platforms = platforms.all;