mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-01 13:14:42 +00:00
Update discourse to latest(ish) ESR version from previous, soon-to-be unsupported, ESR version. Upstream changes: https://releases.discourse.org/changelog/custom?end=v2026.7.0&start=v2026.1.4 Changes: - simple version / dep updates of all plugins and discourse itself - updated the update script to correctly handle changes to discourses's architecture, and fixed a bug - the NamedTemporaryFiles were not flush()ed, which meant their content was not written - discourse now has dependencies under `migrations/` which are specified by path. this requires downloading the `migrations/` directory during the update so `bundle lock` / `bundix` run successfully. the logic for performing this was borrowed from the gitlab package. - the hashes for the newly added dart-sass download are automatically updated - updated some patches to match changes in the targeted code (notification_email, prebuild-asset-processor) - delete a no longer relevant patch (unicorn_logging_and_timeout) (discourse no longer uses unicorn internally, although the external interface is similar / pretends to still exist) - added two new patches, safe-exec-from-nix-store and sass_embedded_vendored_dart_sass - safe-exec-from-nix-store: add /nix/store to the list of executable paths for the container used to sandbox imagemagick, which by default only contains the standard FHS paths - sass_embedded_vendored_dart_sass: patch sass-embedded to use a version of dart-sass provided by the package instead of downloading it's own which would fail. this patch also involves code in default.nix which sets DART_SASS_VENDORED to the path of a downloaded dart-sass version - updated the comment on prebuild-asset-processor.patch to more accurately reflect what and why it exists
30 lines
765 B
Nix
30 lines
765 B
Nix
{
|
|
lib,
|
|
mkDiscoursePlugin,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
mkDiscoursePlugin {
|
|
bundlerEnvArgs.gemdir = ./.;
|
|
name = "discourse-prometheus";
|
|
src = fetchFromGitHub {
|
|
owner = "discourse";
|
|
repo = "discourse-prometheus";
|
|
rev = "ce51879d2c487cf74ca08d6d83d6ccb41cb28738";
|
|
sha256 = "sha256-OhzWC8dgfwhre1HF5sjqXAeIJd3wuknzb12RMCz3+4Y=";
|
|
};
|
|
|
|
patches = [
|
|
# The metrics collector tries to run git to get the commit id but fails
|
|
# because we don't run Discourse from a Git repository.
|
|
./no-git-version.patch
|
|
./spec-import-fix-abi-version.patch
|
|
];
|
|
|
|
meta = {
|
|
homepage = "https://github.com/discourse/discourse-prometheus";
|
|
license = lib.licenses.mit;
|
|
description = "Official Discourse Plugin for Prometheus Monitoring";
|
|
};
|
|
}
|