nixpkgs/pkgs/servers/monitoring
Maximilian Bosch 608db26178
grafana: build frontend from source
Up until now, the frontend was taken from `srcStatic`, i.e. prebuilt
from upstream. I recall at least three cases[1][2][3] where we got a hash
mismatch eventually.

Rather than spending time finding out whether or not it's a supply-chain
attack or just a build issue, I decided to implement a source-build now
with the following benefits:

* It's now actually possible to apply patches for Grafana's frontend.
* We rely a little less on third-party build systems.

Of course, patching potential vulnerabilities in transitive frontend
dependencies is still hard (let alone discovering that this package is
affected!), but that's a fundamental issue we have in nixpkgs and I
won't invent a half-baked solution just for this package, I still
consider this a step into the right direction.

The build itself mainly orients on the `yarn` commands used in the
upstream Makefile[4]. However, we can't use `fetchYarnDeps` here because
yarn v2 (a.k.a. `berry`) is in use which is why the same was done as in
`hedgedoc`, writing a custom FoD that downloads all dependencies and
writes the offline cache into `$out`[5].

Additionally there are two more notable differences to upstream:

* We patch out every dependency to `@grafana/e2e` and `cypress`. The
  first is a dependency on the latter in another version and the latter
  downloads random blobs from the Internet in postInstall. Since it's a
  testing framework (and the `e2e` package apparently a testing
  library), I decided it's not worth the effort and patched it out
  everywhere.

* There was a `zoneinfo.zip` in `$out/share/grafana/tools` that was
  installed from `srcStatic`. This only seems to be used on Windows[6]
  and that's not supported by this package, so I decided to drop it.

[1] https://github.com/NixOS/nixpkgs/pull/251479
[2] https://github.com/NixOS/nixpkgs/pull/130201
[3] https://github.com/NixOS/nixpkgs/pull/104794
[4] https://github.com/grafana/grafana/blob/v10.3.1/Makefile
[5] https://github.com/NixOS/nixpkgs/pull/245170
[6] https://github.com/grafana/grafana/blob/v10.3.1/pkg/setting/setting.go#L1012-L1014
2024-01-23 18:16:44 +01:00
..
alerta alerta-server: 8.7.0 -> 9.0.1 2023-10-05 22:41:40 +03:00
alertmanager-irc-relay
bosun
buildkite-agent-metrics buildkite-agent-metrics: 5.9.2 -> 5.9.3 2023-12-25 11:37:23 +00:00
cadvisor cadvisor: unstable-2023-07-28 -> unstable-2023-10-22 2023-10-22 13:43:51 +03:00
consul-alerts
do-agent do-agent: 3.16.6 -> 3.16.7 2023-09-23 07:28:08 +00:00
fusion-inventory
grafana grafana: build frontend from source 2024-01-23 18:16:44 +01:00
grafana-agent grafana-agent: 0.39.0 -> 0.39.1 2024-01-20 07:00:30 +00:00
grafana-dash-n-grab grafana-dash-n-grab: 0.5.0 -> 0.5.1 2023-12-15 15:26:05 +00:00
grafana-image-renderer grafana-image-renderer: pacify editorconfig 2023-12-20 18:32:39 +01:00
grafana-reporter
icinga2 maintainers/teams: init and add helsinki-systems 2023-11-30 19:11:08 +01:00
kapacitor kapacitor: fix aarch64-darwin build 2023-11-27 00:37:24 +01:00
karma
laurel laurel: 0.5.5 -> 0.5.6 2024-01-17 14:56:18 +01:00
lcdproc
librenms librenms: remove fixed package name (#261395) 2023-10-21 01:24:46 +02:00
loki Merge pull request #268109 from helsinki-systems/helsinki-maintainer-team 2023-12-20 11:43:29 +01:00
longview
mackerel-agent mackerel-agent: 0.78.2 -> 0.78.3 2023-12-27 03:17:04 +00:00
matrix-alertmanager
mimir mimir: 2.10.5 -> 2.11.0 2024-01-01 21:30:09 +00:00
mtail mtail: 3.0.0-rc52 -> 3.0.0-rc53 2024-01-08 15:54:40 +05:30
munin munin: fix missing Date::Parse module error & make test fail w/o a fix 2023-12-25 09:13:32 +01:00
nagios checkSSLCert: 2.77.0 -> 2.78.0 2023-12-08 13:10:15 +01:00
net-snmp net-snmp: drop build-only references from the closure 2023-11-02 17:28:43 +00:00
newrelic-sysmond
phlare
plugins monitoring-plugins: 2.3.0 -> 2.3.5 2023-12-23 12:00:00 +00:00
prometheus prometheus-snmp-exporter: remove myself as maintainer 2024-01-17 20:34:33 +01:00
riemann riemann: 0.3.10 -> 0.3.11 2023-12-28 07:32:44 +00:00
riemann-dash
sensu
sensu-go
seyren
telegraf telegraf: 1.29.1 -> 1.29.2 2024-01-09 12:44:37 +00:00
thanos thanos: 0.32.5 -> 0.33.0 2023-12-30 17:14:30 +00:00
unpoller unpoller: 2.9.2 -> 2.9.5 2023-12-24 20:44:56 +00:00
uptime-kuma uptime-kuma: 1.23.10 -> 1.23.11 2024-01-05 04:28:40 +00:00
vmagent vmagent: 1.93.6 -> 1.96.0 2023-12-25 02:21:46 +00:00
zabbix zabbix40: 4.0.44 -> 4.0.48 2023-09-22 18:51:28 +01:00
zipkin