mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 03:10:19 +00:00
discourse: 2026.8.0 -> 2026.9.0 (#567703)
This commit is contained in:
@@ -54,13 +54,13 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2026.8.0";
|
||||
version = "2026.9.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "discourse";
|
||||
repo = "discourse";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-UUDPZVBQXG6kfW8+TFFDHsNMdH8WLxsgva4jSdZWsC8=";
|
||||
hash = "sha256-xOZyoDA+/UPV/art5z8lNSM7RfNejeYcZAL+JzrPk7A=";
|
||||
};
|
||||
|
||||
pnpm = pnpm_10;
|
||||
@@ -180,8 +180,8 @@ let
|
||||
rubyEnv =
|
||||
let
|
||||
# these hashes are auto-updated by update.py
|
||||
dart-x64-hash = "sha256-2rnqNeEr8PFMuFa4IhutxxXui1dCw3XQVqCV5ZwsUR8=";
|
||||
dart-arm64-hash = "sha256-8sgc9IaeWSRnURFtMuSOqnKACkDc5WynmLIboYWwoSM=";
|
||||
dart-x64-hash = "sha256-pNK3ekjTYP/FCInhtb5uxDBDP/yA79fnE76avxoHt9k=";
|
||||
dart-arm64-hash = "sha256-B6OWLvW7dM6DIeO5A6WbpQ0IHJca54HZCRLyAn2XKK0=";
|
||||
in
|
||||
bundlerEnv rec {
|
||||
name = "discourse-ruby-env-${version}";
|
||||
@@ -274,7 +274,7 @@ let
|
||||
unpackPhase
|
||||
nativeBuildInputs
|
||||
;
|
||||
hash = "sha256-OIkSavAjja1atbeyPAKFXsXoYI3nUk9c5G3RFBj53Uk=";
|
||||
hash = "sha256-2OITwITCGoAIahIXpemWP38iFGSlrycUV319pmdD1dY=";
|
||||
};
|
||||
|
||||
dontBuild = false;
|
||||
@@ -350,7 +350,7 @@ let
|
||||
pname = "discourse-assets";
|
||||
inherit version src pnpm;
|
||||
fetcherVersion = 3;
|
||||
hash = "sha256-fm6hboG2Bjq0HUnbwdLiC1FpoWRZvq+1bN5SupQ2P2k=";
|
||||
hash = "sha256-oahr5SJzHfIfcB7NFxeeEYDf3Q4m/iC/JMpNjlEWgSE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = runtimeDeps ++ [
|
||||
@@ -471,6 +471,8 @@ let
|
||||
dontCheckForBrokenSymlinks = true;
|
||||
};
|
||||
|
||||
voiceAssets = rubyEnv.gems.discourse_voice_assets;
|
||||
|
||||
discourse = stdenv.mkDerivation {
|
||||
pname = "discourse";
|
||||
inherit version src;
|
||||
@@ -520,6 +522,9 @@ let
|
||||
|
||||
# in the imagemagick sandbox, symlinks permissions are checked (as you would hope) but this causes other problems..
|
||||
./optimize-image-fix.patch
|
||||
|
||||
# Skip voice plugin asset symlink removal/recreation at runtime.
|
||||
./voice-plugin-assets.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@@ -565,6 +570,14 @@ let
|
||||
p: "ln -sf ${p} $out/share/discourse/plugins/${p.pluginName or ""}"
|
||||
) plugins}
|
||||
|
||||
# The voice plugin creates its asset symlink below its source tree. That
|
||||
# works during the asset build, but the package source tree is read-only
|
||||
# at runtime..
|
||||
mkdir -p $out/share/discourse/plugins/voice/public/javascripts
|
||||
ln -sf \
|
||||
${voiceAssets}/lib/ruby/gems/${rubyEnv.ruby.version.libDir}/gems/discourse_voice_assets-${voiceAssets.version}/vendor \
|
||||
$out/share/discourse/plugins/voice/public/javascripts/${voiceAssets.version}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/lib/asset_processor.rb b/lib/asset_processor.rb
|
||||
index 0c602a85220..be1e22061b0 100644
|
||||
index 95b1245391e..adff8527457 100644
|
||||
--- a/lib/asset_processor.rb
|
||||
+++ b/lib/asset_processor.rb
|
||||
@@ -5,7 +5,7 @@ class AssetProcessor
|
||||
@@ -11,16 +11,16 @@ index 0c602a85220..be1e22061b0 100644
|
||||
filename_prefix: "asset-processor",
|
||||
dependency_globs: %w[
|
||||
node_modules/.pnpm/lock.yaml
|
||||
diff --git a/lib/pretty_text.rb b/lib/pretty_text.rb
|
||||
index 6f176324799..9815f579212 100644
|
||||
--- a/lib/pretty_text.rb
|
||||
+++ b/lib/pretty_text.rb
|
||||
@@ -54,7 +54,7 @@ module PrettyText
|
||||
diff --git a/lib/pretty_text/core_bundle.rb b/lib/pretty_text/core_bundle.rb
|
||||
index 963dfb1ac6b..97b717e7569 100644
|
||||
--- a/lib/pretty_text/core_bundle.rb
|
||||
+++ b/lib/pretty_text/core_bundle.rb
|
||||
@@ -21,7 +21,7 @@ module PrettyText
|
||||
|
||||
CORE_BUNDLE =
|
||||
PrecompiledBundle.new(
|
||||
- dir: "tmp/pretty-text-processor",
|
||||
+ dir: "frontend/pretty-text-processor.build",
|
||||
filename_prefix: "pretty-text",
|
||||
dependency_globs:
|
||||
%w[
|
||||
BUNDLE =
|
||||
PrecompiledBundle.new(
|
||||
- dir: "tmp/pretty-text-processor",
|
||||
+ dir: "frontend/pretty-text-processor.build",
|
||||
filename_prefix: "pretty-text",
|
||||
dependency_globs:
|
||||
%w[
|
||||
|
||||
@@ -9,8 +9,8 @@ mkDiscoursePlugin {
|
||||
src = fetchFromGitHub {
|
||||
owner = "discourse";
|
||||
repo = "discourse-docs";
|
||||
rev = "0796384551e3f9d328c57e88577098be05d816c7";
|
||||
sha256 = "sha256-lZ8BlFaQcd9H+bom2igbJl4Ty7qmqtpbOpGbqIF8nEo=";
|
||||
rev = "89bae0e929387ed5697fd3c5eedf9b3dbe85bead";
|
||||
sha256 = "sha256-ycDyYRi7uab4vxHY8K2kUytWBmTuFTFHYGD1AHpzC+0=";
|
||||
};
|
||||
meta = {
|
||||
homepage = "https://github.com/discourse/discourse-docs";
|
||||
|
||||
@@ -9,8 +9,8 @@ mkDiscoursePlugin {
|
||||
src = fetchFromGitHub {
|
||||
owner = "discourse";
|
||||
repo = "discourse-yearly-review";
|
||||
rev = "97720c573f04ce32544ef1e9353b12005de0bdec";
|
||||
sha256 = "sha256-ZhkrPYFjhtNoh6jQhqPTMZJqHMyZo3tdbtSl3MuOJz0=";
|
||||
rev = "a4e9ee393de923332609d0436e3c1c8757f6cb1c";
|
||||
sha256 = "sha256-WHU7vYTnavX3waJWjHn11kg70TCoFH9cdmdPRSsNZO4=";
|
||||
};
|
||||
meta = {
|
||||
homepage = "https://github.com/discourse/discourse-yearly-review";
|
||||
|
||||
@@ -8,13 +8,13 @@ source "https://rubygems.org"
|
||||
|
||||
gem "bootsnap", require: false, platform: :mri
|
||||
|
||||
gem "actionmailer", "~> 8.0.0"
|
||||
gem "actionpack", "~> 8.0.0"
|
||||
gem "actionview", "~> 8.0.0"
|
||||
gem "activemodel", "~> 8.0.0"
|
||||
gem "activerecord", "~> 8.0.0"
|
||||
gem "activesupport", "~> 8.0.0"
|
||||
gem "railties", "~> 8.0.0"
|
||||
gem "actionmailer", "~> 8.1.0"
|
||||
gem "actionpack", "~> 8.1.0"
|
||||
gem "actionview", "~> 8.1.0"
|
||||
gem "activemodel", "~> 8.1.0"
|
||||
gem "activerecord", "~> 8.1.0"
|
||||
gem "activesupport", "~> 8.1.0"
|
||||
gem "railties", "~> 8.1.0"
|
||||
|
||||
gem "propshaft"
|
||||
gem "json"
|
||||
@@ -60,6 +60,8 @@ gem "message_bus"
|
||||
gem "rails_multisite"
|
||||
|
||||
gem "fastimage"
|
||||
gem "msgpack"
|
||||
gem "ruby-vips", "~> 2.3", require: false
|
||||
|
||||
gem "aws-sdk-s3", require: false
|
||||
gem "aws-sdk-sns", require: false
|
||||
@@ -80,13 +82,13 @@ gem "loofah"
|
||||
gem "css_parser", require: false
|
||||
|
||||
gem "omniauth"
|
||||
gem "omniauth-facebook"
|
||||
gem "omniauth-twitter"
|
||||
gem "omniauth-github"
|
||||
gem "omniauth-facebook", require: false
|
||||
gem "omniauth-twitter", require: false
|
||||
gem "omniauth-github", require: false
|
||||
|
||||
gem "omniauth-oauth2", require: false
|
||||
|
||||
gem "omniauth-google-oauth2"
|
||||
gem "omniauth-google-oauth2", require: false
|
||||
|
||||
gem "oj"
|
||||
|
||||
@@ -114,7 +116,7 @@ gem "rack-protection" # security
|
||||
gem "cbor", require: false
|
||||
gem "cose", require: false
|
||||
gem "addressable"
|
||||
gem "json_schemer"
|
||||
gem "json_schemer", require: false
|
||||
|
||||
gem "net-smtp", require: false
|
||||
gem "net-pop", require: false
|
||||
@@ -126,37 +128,36 @@ group :test do
|
||||
gem "capybara", require: false
|
||||
gem "webmock", require: false
|
||||
gem "simplecov", require: false
|
||||
gem "test-prof"
|
||||
gem "test-prof", require: false
|
||||
gem "rails-dom-testing", require: false
|
||||
gem "minio_runner", require: false
|
||||
gem "capybara-playwright-driver"
|
||||
gem "capybara-playwright-driver", require: false
|
||||
gem "puma", require: false
|
||||
end
|
||||
|
||||
group :test, :development do
|
||||
gem "rspec"
|
||||
gem "rspec", require: false
|
||||
gem "listen", require: false
|
||||
gem "certified", require: false
|
||||
gem "fabrication", require: false
|
||||
gem "mocha", require: false
|
||||
|
||||
gem "rb-fsevent", require: RUBY_PLATFORM =~ /darwin/i ? "rb-fsevent" : false
|
||||
gem "rb-fsevent", require: false
|
||||
|
||||
gem "rspec-rails"
|
||||
gem "rspec-rails", require: false
|
||||
|
||||
gem "shoulda-matchers", require: false
|
||||
gem "rspec-html-matchers"
|
||||
gem "rspec-html-matchers", require: false
|
||||
gem "debug", ">= 1.0.0", require: "debug/prelude"
|
||||
gem "rubocop-discourse", require: false
|
||||
gem "parallel_tests"
|
||||
gem "parallel_tests", require: false
|
||||
|
||||
gem "rswag-specs"
|
||||
gem "rswag-specs", require: false
|
||||
|
||||
gem "annotaterb"
|
||||
gem "annotaterb", require: false
|
||||
|
||||
gem "syntax_tree"
|
||||
gem "syntax_tree", require: false
|
||||
|
||||
gem "rspec-multi-mock"
|
||||
gem "rspec-multi-mock", require: false
|
||||
end
|
||||
|
||||
group :development do
|
||||
@@ -175,8 +176,8 @@ if ENV["ALLOW_DEV_POPULATE"] == "1"
|
||||
gem "faker"
|
||||
else
|
||||
group :development, :test do
|
||||
gem "discourse_dev_assets"
|
||||
gem "faker"
|
||||
gem "discourse_dev_assets", require: false
|
||||
gem "faker", require: false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -224,7 +225,7 @@ gem "sassc-embedded"
|
||||
|
||||
gem "rotp", require: false
|
||||
|
||||
gem "rqrcode"
|
||||
gem "rqrcode", require: false
|
||||
|
||||
gem "rubyzip", require: false
|
||||
|
||||
@@ -232,10 +233,10 @@ gem "landlock", require: false
|
||||
|
||||
gem "sshkey", require: false
|
||||
|
||||
gem "rchardet", require: false
|
||||
gem "lz4-ruby", require: false, platform: :ruby
|
||||
|
||||
gem "sanitize"
|
||||
gem "reverse_markdown", "3.0.2", require: false
|
||||
|
||||
if ENV["IMPORT"] == "1"
|
||||
gem "mysql2"
|
||||
@@ -244,7 +245,6 @@ if ENV["IMPORT"] == "1"
|
||||
# NOTE: in import mode the version of sqlite can matter a lot, so we stick it to a specific one
|
||||
gem "sqlite3", "~> 1.3", ">= 1.3.13"
|
||||
gem "ruby-bbcode-to-md", git: "https://github.com/nlalonde/ruby-bbcode-to-md"
|
||||
gem "reverse_markdown"
|
||||
gem "tiny_tds"
|
||||
gem "csv"
|
||||
end
|
||||
@@ -273,6 +273,9 @@ gem "cgi", ">= 0.3.6", require: false
|
||||
gem "tzinfo-data"
|
||||
gem "csv", require: false
|
||||
|
||||
# Rails 8.1 drops its own dependency on `benchmark`.
|
||||
gem "benchmark", require: false
|
||||
|
||||
# dependencies for the automation plugin
|
||||
gem "iso8601"
|
||||
gem "rrule"
|
||||
@@ -308,6 +311,9 @@ gem "tiktoken_ruby", require: false
|
||||
gem "smarter_json", require: false
|
||||
gem "json_completer", require: false
|
||||
gem "discourse_ai-tokenizers", require: false
|
||||
|
||||
# for the voice plugin
|
||||
gem "discourse_voice_assets", require: false
|
||||
gem "ed25519" # TODO: remove this as existing ssl gem should handle this
|
||||
gem "Ascii85", require: false
|
||||
gem "ruby-rc4", require: false
|
||||
|
||||
652
pkgs/servers/web-apps/discourse/rubyEnv/Gemfile.lock
generated
652
pkgs/servers/web-apps/discourse/rubyEnv/Gemfile.lock
generated
File diff suppressed because it is too large
Load Diff
536
pkgs/servers/web-apps/discourse/rubyEnv/gemset.nix
generated
536
pkgs/servers/web-apps/discourse/rubyEnv/gemset.nix
generated
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,19 @@
|
||||
diff --git a/ext/sass/Rakefile b/ext/sass/Rakefile
|
||||
index d542efd..93f97cf 100644
|
||||
index a36b11a..93f97cf 100644
|
||||
--- a/ext/sass/Rakefile
|
||||
+++ b/ext/sass/Rakefile
|
||||
@@ -84,11 +84,18 @@ file File.absolute_path('node_modules/sass', ARCHDIR) do
|
||||
@@ -84,10 +84,18 @@ file File.absolute_path('node_modules/sass', ARCHDIR) do
|
||||
end
|
||||
|
||||
task 'dart-sass' => (
|
||||
- begin
|
||||
- SassConfig.dart_sass
|
||||
- if SassConfig.dart_support?
|
||||
- File.absolute_path('dart-sass/sass', ARCHDIR)
|
||||
- rescue NotImplementedError
|
||||
- File.absolute_path('node_modules/sass', ARCHDIR)
|
||||
+ p ENV
|
||||
+ if ENV.has_key?('DART_SASS_VENDORED')
|
||||
+ mkdir_p ARCHDIR
|
||||
+ cp_r ENV.fetch('DART_SASS_VENDORED'), File.absolute_path('dart-sass', ARCHDIR)
|
||||
+ else
|
||||
else
|
||||
- File.absolute_path('node_modules/sass', ARCHDIR)
|
||||
+ raise Errno::EINVAL, "no vendored SASS"
|
||||
+ begin
|
||||
+ SassConfig.dart_sass
|
||||
|
||||
38
pkgs/servers/web-apps/discourse/voice-plugin-assets.patch
Normal file
38
pkgs/servers/web-apps/discourse/voice-plugin-assets.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
diff --git a/plugins/voice/plugin.rb b/plugins/voice/plugin.rb
|
||||
index a715e9364e0..29b7eeb3c72 100644
|
||||
--- a/plugins/voice/plugin.rb
|
||||
+++ b/plugins/voice/plugin.rb
|
||||
@@ -15,18 +15,22 @@ require "discourse_voice_assets"
|
||||
# immutable, so the versioned URL is what busts caches on a gem bump. The
|
||||
# client learns the current base path from the site serializer.
|
||||
voice_javascripts_dir = File.join(__dir__, "public", "javascripts")
|
||||
-FileUtils.mkdir_p(voice_javascripts_dir)
|
||||
-Dir
|
||||
- .children(voice_javascripts_dir)
|
||||
- .each do |entry|
|
||||
- if entry != DiscourseVoiceAssets::VERSION
|
||||
- FileUtils.rm_rf(File.join(voice_javascripts_dir, entry))
|
||||
- end
|
||||
- end
|
||||
-Discourse::Utils.atomic_ln_s(
|
||||
- DiscourseVoiceAssets.vendor_path,
|
||||
- File.join(voice_javascripts_dir, DiscourseVoiceAssets::VERSION),
|
||||
+unless File.symlink?(
|
||||
+ File.join(voice_javascripts_dir, DiscourseVoiceAssets::VERSION)
|
||||
)
|
||||
+ FileUtils.mkdir_p(voice_javascripts_dir)
|
||||
+ Dir
|
||||
+ .children(voice_javascripts_dir)
|
||||
+ .each do |entry|
|
||||
+ if entry != DiscourseVoiceAssets::VERSION
|
||||
+ FileUtils.rm_rf(File.join(voice_javascripts_dir, entry))
|
||||
+ end
|
||||
+ end
|
||||
+ Discourse::Utils.atomic_ln_s(
|
||||
+ DiscourseVoiceAssets.vendor_path,
|
||||
+ File.join(voice_javascripts_dir, DiscourseVoiceAssets::VERSION),
|
||||
+ )
|
||||
+end
|
||||
|
||||
enabled_site_setting :voice_enabled
|
||||
|
||||
Reference in New Issue
Block a user