Loading
+3 −0
Original line number Diff line number Diff line
@@ -651,6 +651,9 @@ in
      preload_link_header = false;
      redirect_avatar_requests = false;
      pg_force_readonly_mode = false;
      dns_query_timeout_secs = null;
      regex_timeout_seconds = 2;
      allow_impersonation = true;
    };

    services.redis.servers.discourse =
+13 −0
Original line number Diff line number Diff line
diff --git a/app/assets/javascripts/discourse/package.json b/app/assets/javascripts/discourse/package.json
index 9e4533d2..e57f8a5f 100644
--- a/app/assets/javascripts/discourse/package.json
+++ b/app/assets/javascripts/discourse/package.json
@@ -14,7 +14,7 @@
     "build": "ember build",
     "start": "ember serve",
     "test": "ember test",
-    "postinstall": "yarn --silent --cwd .. patch-package"
+    "postinstall": "patch-package"
   },
   "dependencies": {
     "@babel/core": "^7.21.4",
+27 −5
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@
, bundlerEnv
, callPackage

, ruby_3_1
, ruby_3_2
, replace
, gzip
, gnutar
@@ -38,21 +38,22 @@
, fixup_yarn_lock
, nodePackages
, nodejs_16
, dart-sass-embedded

, plugins ? []
}@args:

let
  version = "3.1.0.beta2";
  version = "3.1.0.beta4";

  src = fetchFromGitHub {
    owner = "discourse";
    repo = "discourse";
    rev = "v${version}";
    sha256 = "sha256-wkNTm5/QyujPcMUrnc6eWmjhrRQAthhmejmjpy6zmbE=";
    sha256 = "sha256-22GXFYPjPYL20amR4xFB4L/dCp32H4Z3uf0GLGEghUE=";
  };

  ruby = ruby_3_1;
  ruby = ruby_3_2;

  runtimeDeps = [
    # For backups, themes and assets
@@ -186,6 +187,20 @@ let
              cp $(readlink -f ${libpsl}/lib/libpsl.so) vendor/libpsl.x86_64.so
            '';
          };
          sass-embedded = gems.sass-embedded // {
            dontBuild = false;
            # `sass-embedded` depends on `dart-sass-embedded` and tries to
            # fetch that as `.tar.gz` from GitHub releases. That `.tar.gz`
            # can also be specified via `SASS_EMBEDDED`. But instead of
            # compressing our `dart-sass-embedded` just to decompress it
            # again, we simply patch the Rakefile to symlink that path.
            patches = [
              ./rubyEnv/sass-embedded-static.patch
            ];
            postPatch = ''
              export SASS_EMBEDDED=${dart-sass-embedded}
            '';
          };
        };

    groups = [
@@ -199,7 +214,7 @@ let

    yarnOfflineCache = fetchYarnDeps {
      yarnLock = src + "/app/assets/javascripts/yarn.lock";
      sha256 = "0ryc4p5s35mzg1p71z98x5fvr5fpldmgghdi1viha4ckbpv153lw";
      sha256 = "0a20kns4irdpzzx2dvdjbi0m3s754gp737q08z5nlcnffxqvykrk";
    };

    nativeBuildInputs = runtimeDeps ++ [
@@ -207,6 +222,7 @@ let
      redis
      nodePackages.uglify-js
      nodePackages.terser
      nodePackages.patch-package
      yarn
      nodejs_16
    ];
@@ -226,6 +242,12 @@ let
      # Fix the rake command used to recursively execute itself in the
      # assets precompilation task.
      ./assets_rake_command.patch

      # `app/assets/javascripts/discourse/package.json`'s postinstall
      # hook tries to call `../node_modules/.bin/patch-package`, which
      # hasn't been `patchShebangs`-ed yet. So instead we just use
      # `patch-package` from `nativeBuildInputs`.
      ./asserts_patch-package_from_path.patch
    ];

    # We have to set up an environment that is close enough to
+9 −9
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ else
  # this allows us to include the bits of rails we use without pieces we do not.
  #
  # To issue a rails update bump the version number here
  rails_version = "7.0.4.1"
  rails_version = "7.0.4.3"
  gem "actionmailer", rails_version
  gem "actionpack", rails_version
  gem "actionview", rails_version
@@ -41,7 +41,7 @@ gem "actionview_precompiler", require: false

gem "discourse-seed-fu"

gem "mail", git: "https://github.com/discourse/mail.git"
gem "mail"
gem "mini_mime"
gem "mini_suffix"

@@ -71,8 +71,6 @@ gem "rails_multisite"

gem "fast_xs", platform: :ruby

gem "xorcist"

gem "fastimage"

gem "aws-sdk-s3", require: false
@@ -105,7 +103,7 @@ gem "pg"
gem "mini_sql"
gem "pry-rails", require: false
gem "pry-byebug", require: false
gem "r2", require: false
gem "rtlcss", require: false
gem "rake"

gem "thor", require: false
@@ -180,6 +178,7 @@ group :development do
  gem "better_errors", platform: :mri, require: !!ENV["BETTER_ERRORS"]
  gem "binding_of_caller"
  gem "yaml-lint"
  gem "yard"
end

if ENV["ALLOW_DEV_POPULATE"] == "1"
@@ -229,10 +228,9 @@ gem "logstash-event", require: false
gem "logstash-logger", require: false
gem "logster"

# NOTE: later versions of sassc are causing a segfault, possibly dependent on processer architecture
# and until resolved should be locked at 2.0.1
gem "sassc", "2.0.1", require: false
gem "sassc-rails"
# These are forks of sassc and sassc-rails with dart-sass support
gem "dartsass-ruby"
gem "dartsass-sprockets"

gem "rotp", require: false

@@ -279,3 +277,5 @@ gem "webrick", require: false

# Workaround until Ruby ships with cgi version 0.3.6 or higher.
gem "cgi", ">= 0.3.6", require: false

gem "tzinfo-data"
+111 −106
Original line number Diff line number Diff line
GIT
  remote: https://github.com/discourse/mail.git
  revision: 5b700fc95ee66378e0cf2559abc73c8bc3062a4b
  specs:
    mail (2.8.0.edge)
      mini_mime (>= 0.1.1)

GIT
  remote: https://github.com/rails/sprockets
  revision: f4d3dae71ef29c44b75a49cfbf8032cce07b423a
@@ -17,25 +10,25 @@ GIT
GEM
  remote: https://rubygems.org/
  specs:
    actionmailer (7.0.4.1)
      actionpack (= 7.0.4.1)
      actionview (= 7.0.4.1)
      activejob (= 7.0.4.1)
      activesupport (= 7.0.4.1)
    actionmailer (7.0.4.3)
      actionpack (= 7.0.4.3)
      actionview (= 7.0.4.3)
      activejob (= 7.0.4.3)
      activesupport (= 7.0.4.3)
      mail (~> 2.5, >= 2.5.4)
      net-imap
      net-pop
      net-smtp
      rails-dom-testing (~> 2.0)
    actionpack (7.0.4.1)
      actionview (= 7.0.4.1)
      activesupport (= 7.0.4.1)
    actionpack (7.0.4.3)
      actionview (= 7.0.4.3)
      activesupport (= 7.0.4.3)
      rack (~> 2.0, >= 2.2.0)
      rack-test (>= 0.6.3)
      rails-dom-testing (~> 2.0)
      rails-html-sanitizer (~> 1.0, >= 1.2.0)
    actionview (7.0.4.1)
      activesupport (= 7.0.4.1)
    actionview (7.0.4.3)
      activesupport (= 7.0.4.3)
      builder (~> 3.1)
      erubi (~> 1.4)
      rails-dom-testing (~> 2.0)
@@ -44,20 +37,20 @@ GEM
      actionview (>= 6.0.a)
    active_model_serializers (0.8.4)
      activemodel (>= 3.0)
    activejob (7.0.4.1)
      activesupport (= 7.0.4.1)
    activejob (7.0.4.3)
      activesupport (= 7.0.4.3)
      globalid (>= 0.3.6)
    activemodel (7.0.4.1)
      activesupport (= 7.0.4.1)
    activerecord (7.0.4.1)
      activemodel (= 7.0.4.1)
      activesupport (= 7.0.4.1)
    activesupport (7.0.4.1)
    activemodel (7.0.4.3)
      activesupport (= 7.0.4.3)
    activerecord (7.0.4.3)
      activemodel (= 7.0.4.3)
      activesupport (= 7.0.4.3)
    activesupport (7.0.4.3)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (>= 1.6, < 2)
      minitest (>= 5.1)
      tzinfo (~> 2.0)
    addressable (2.8.1)
    addressable (2.8.4)
      public_suffix (>= 2.0.2, < 6.0)
    annotate (3.2.0)
      activerecord (>= 3.2, < 8.0)
@@ -88,14 +81,14 @@ GEM
      rack (>= 0.9.0)
    binding_of_caller (1.0.0)
      debug_inspector (>= 0.0.1)
    bootsnap (1.15.0)
    bootsnap (1.16.0)
      msgpack (~> 1.2)
    builder (3.2.4)
    bullet (7.0.7)
      activesupport (>= 3.0.0)
      uniform_notifier (~> 1.11)
    byebug (11.1.3)
    capybara (3.38.0)
    capybara (3.39.0)
      addressable
      matrix
      mini_mime (>= 0.1.3)
@@ -110,8 +103,8 @@ GEM
    chunky_png (1.4.0)
    coderay (1.1.3)
    colored2 (3.1.2)
    concurrent-ruby (1.2.0)
    connection_pool (2.3.0)
    concurrent-ruby (1.2.2)
    connection_pool (2.4.0)
    cose (1.3.0)
      cbor (~> 0.5.9)
      openssl-signature_algorithm (~> 1.0)
@@ -121,6 +114,14 @@ GEM
    crass (1.0.6)
    css_parser (1.14.0)
      addressable
    dartsass-ruby (3.0.1)
      sass-embedded (~> 1.54)
    dartsass-sprockets (3.0.0)
      dartsass-ruby (~> 3.0)
      railties (>= 4.0.0)
      sprockets (> 3.0)
      sprockets-rails
      tilt
    date (3.3.3)
    debug_inspector (1.1.0)
    diff-lcs (1.5.0)
@@ -138,7 +139,7 @@ GEM
      regexp_parser (~> 2.2)
    email_reply_trimmer (0.1.13)
    erubi (1.12.0)
    excon (0.97.2)
    excon (0.99.0)
    execjs (2.8.1)
    exifr (1.3.10)
    fabrication (2.30.0)
@@ -149,7 +150,7 @@ GEM
      faraday-net_http (>= 2.0, < 3.1)
      ruby2_keywords (>= 0.0.4)
    faraday-net_http (3.0.2)
    faraday-retry (2.0.0)
    faraday-retry (2.1.0)
      faraday (~> 2.0)
    fast_blank (1.0.1)
    fast_xs (0.8.0)
@@ -157,8 +158,9 @@ GEM
    ffi (1.15.5)
    fspath (3.1.2)
    gc_tracer (1.5.1)
    globalid (1.0.1)
    globalid (1.1.0)
      activesupport (>= 5.0)
    google-protobuf (3.22.3)
    guess_html_encoding (0.0.11)
    hana (1.3.7)
    hashdiff (1.0.1)
@@ -169,7 +171,7 @@ GEM
    http_accept_language (2.1.1)
    i18n (1.12.0)
      concurrent-ruby (~> 1.0)
    image_optim (0.31.2)
    image_optim (0.31.3)
      exifr (~> 1.2, >= 1.2.2)
      fspath (~> 3.0)
      image_size (>= 1.5, < 4)
@@ -186,7 +188,7 @@ GEM
      hana (~> 1.3)
      regexp_parser (~> 2.0)
      uri_template (~> 0.7)
    jwt (2.6.0)
    jwt (2.7.0)
    kgio (2.11.4)
    libv8-node (16.10.0.0)
    listen (3.8.0)
@@ -201,12 +203,17 @@ GEM
    logstash-event (1.2.02)
    logstash-logger (0.26.1)
      logstash-event (~> 1.2)
    logster (2.11.3)
    loofah (2.19.1)
    logster (2.12.2)
    loofah (2.20.0)
      crass (~> 1.0.2)
      nokogiri (>= 1.5.9)
    lru_redux (1.1.0)
    lz4-ruby (0.3.3)
    mail (2.8.1)
      mini_mime (>= 0.1.1)
      net-imap
      net-pop
      net-smtp
    matrix (0.4.2)
    maxminddb (0.1.22)
    memory_profiler (1.0.1)
@@ -222,10 +229,10 @@ GEM
    mini_sql (1.4.0)
    mini_suffix (0.3.3)
      ffi (~> 1.9)
    minitest (5.17.0)
    minitest (5.18.0)
    mocha (2.0.2)
      ruby2_keywords (>= 0.0.5)
    msgpack (1.6.0)
    msgpack (1.7.0)
    multi_json (1.15.0)
    multi_xml (0.6.0)
    mustache (1.1.1)
@@ -240,8 +247,8 @@ GEM
      timeout
    net-smtp (0.3.3)
      net-protocol
    nio4r (2.5.8)
    nokogiri (1.14.0)
    nio4r (2.5.9)
    nokogiri (1.14.3)
      mini_portile2 (~> 2.8.0)
      racc (~> 1.4)
    oauth (1.1.0)
@@ -279,17 +286,17 @@ GEM
    omniauth-twitter (1.4.0)
      omniauth-oauth (~> 1.1)
      rack
    openssl (3.0.2)
    openssl-signature_algorithm (1.2.1)
      openssl (> 2.0, < 3.1)
    openssl (3.1.0)
    openssl-signature_algorithm (1.3.0)
      openssl (> 2.0)
    optimist (3.0.1)
    parallel (1.22.1)
    parallel_tests (4.1.0)
    parallel_tests (4.2.0)
      parallel
    parser (3.2.0.0)
    parser (3.2.2.0)
      ast (~> 2.4.1)
    pg (1.4.5)
    prettier_print (1.2.0)
    pg (1.4.6)
    prettier_print (1.2.1)
    progress (3.6.0)
    pry (0.14.2)
      coderay (~> 1.1)
@@ -300,38 +307,37 @@ GEM
    pry-rails (0.3.9)
      pry (>= 0.10.4)
    public_suffix (5.0.1)
    puma (6.0.2)
    puma (6.2.1)
      nio4r (~> 2.0)
    r2 (0.2.7)
    racc (1.6.2)
    rack (2.2.6.2)
    rack-mini-profiler (3.0.0)
    rack (2.2.6.4)
    rack-mini-profiler (3.1.0)
      rack (>= 1.2.0)
    rack-protection (3.0.5)
    rack-protection (3.0.6)
      rack
    rack-test (2.0.2)
    rack-test (2.1.0)
      rack (>= 1.3)
    rails-dom-testing (2.0.3)
      activesupport (>= 4.2.0)
      nokogiri (>= 1.6)
    rails-html-sanitizer (1.5.0)
      loofah (~> 2.19, >= 2.19.1)
    rails_failover (0.8.1)
    rails_failover (1.0.0)
      activerecord (> 6.0, < 7.1)
      concurrent-ruby
      railties (> 6.0, < 7.1)
    rails_multisite (4.0.1)
      activerecord (> 5.0, < 7.1)
      railties (> 5.0, < 7.1)
    railties (7.0.4.1)
      actionpack (= 7.0.4.1)
      activesupport (= 7.0.4.1)
    railties (7.0.4.3)
      actionpack (= 7.0.4.3)
      activesupport (= 7.0.4.3)
      method_source
      rake (>= 12.2)
      thor (~> 1.0)
      zeitwerk (~> 2.5)
    rainbow (3.1.1)
    raindrops (0.20.0)
    raindrops (0.20.1)
    rake (13.0.6)
    rb-fsevent (0.11.2)
    rb-inotify (0.10.1)
@@ -341,10 +347,10 @@ GEM
      msgpack (>= 0.4.3)
      optimist (>= 3.0.0)
    rchardet (1.8.0)
    redis (4.8.0)
    redis (4.8.1)
    redis-namespace (1.10.0)
      redis (>= 4)
    regexp_parser (2.6.2)
    regexp_parser (2.8.0)
    request_store (1.5.1)
      rack (>= 1.4)
    rexml (3.2.5)
@@ -358,7 +364,7 @@ GEM
      rspec-core (~> 3.12.0)
      rspec-expectations (~> 3.12.0)
      rspec-mocks (~> 3.12.0)
    rspec-core (3.12.0)
    rspec-core (3.12.1)
      rspec-support (~> 3.12.0)
    rspec-expectations (3.12.2)
      diff-lcs (>= 1.2.0, < 2.0)
@@ -366,7 +372,7 @@ GEM
    rspec-html-matchers (0.10.0)
      nokogiri (~> 1)
      rspec (>= 3.0.0.a)
    rspec-mocks (3.12.3)
    rspec-mocks (3.12.5)
      diff-lcs (>= 1.2.0, < 2.0)
      rspec-support (~> 3.12.0)
    rspec-rails (6.0.1)
@@ -385,46 +391,42 @@ GEM
      json-schema (>= 2.2, < 4.0)
      railties (>= 3.1, < 7.1)
      rspec-core (>= 2.14)
    rubocop (1.44.0)
    rtlcss (0.2.0)
      mini_racer (~> 0.6.3)
    rubocop (1.50.2)
      json (~> 2.3)
      parallel (~> 1.10)
      parser (>= 3.2.0.0)
      rainbow (>= 2.2.2, < 4.0)
      regexp_parser (>= 1.8, < 3.0)
      rexml (>= 3.2.5, < 4.0)
      rubocop-ast (>= 1.24.1, < 2.0)
      rubocop-ast (>= 1.28.0, < 2.0)
      ruby-progressbar (~> 1.7)
      unicode-display_width (>= 2.4.0, < 3.0)
    rubocop-ast (1.24.1)
      parser (>= 3.1.1.0)
    rubocop-capybara (2.17.0)
    rubocop-ast (1.28.0)
      parser (>= 3.2.1.0)
    rubocop-capybara (2.17.1)
      rubocop (~> 1.41)
    rubocop-discourse (3.0.3)
    rubocop-discourse (3.2.0)
      rubocop (>= 1.1.0)
      rubocop-rspec (>= 2.0.0)
    rubocop-rspec (2.18.1)
    rubocop-rspec (2.19.0)
      rubocop (~> 1.33)
      rubocop-capybara (~> 2.17)
    ruby-prof (1.4.5)
    ruby-progressbar (1.11.0)
    ruby-prof (1.6.1)
    ruby-progressbar (1.13.0)
    ruby-readability (0.7.0)
      guess_html_encoding (>= 0.0.4)
      nokogiri (>= 1.6.0)
    ruby2_keywords (0.0.5)
    rubyzip (2.3.2)
    sanitize (6.0.0)
    sanitize (6.0.1)
      crass (~> 1.0.2)
      nokogiri (>= 1.12.0)
    sassc (2.0.1)
      ffi (~> 1.9)
      rake
    sassc-rails (2.1.2)
      railties (>= 4.0.0)
      sassc (>= 2.0)
      sprockets (> 3.0)
      sprockets-rails
      tilt
    selenium-webdriver (4.8.0)
    sass-embedded (1.62.0)
      google-protobuf (~> 3.21)
      rake (>= 10.0.0)
    selenium-webdriver (4.8.6)
      rexml (~> 3.2, >= 3.2.5)
      rubyzip (>= 1.2.2, < 3.0)
      websocket (~> 1.0)
@@ -448,16 +450,18 @@ GEM
      activesupport (>= 5.2)
      sprockets (>= 3.0.0)
    sshkey (2.0.0)
    stackprof (0.2.23)
    syntax_tree (5.2.0)
    stackprof (0.2.25)
    syntax_tree (6.1.1)
      prettier_print (>= 1.2.0)
    syntax_tree-disable_ternary (1.0.0)
    test-prof (1.1.0)
    test-prof (1.2.1)
    thor (1.2.1)
    tilt (2.0.11)
    timeout (0.3.1)
    tzinfo (2.0.5)
    tilt (2.1.0)
    timeout (0.3.2)
    tzinfo (2.0.6)
      concurrent-ruby (~> 1.0)
    tzinfo-data (1.2023.3)
      tzinfo (>= 1.0.0)
    uglifier (4.2.0)
      execjs (>= 0.3.0, < 3)
    unf (0.1.4)
@@ -468,9 +472,9 @@ GEM
      kgio (~> 2.6)
      raindrops (~> 0.7)
    uniform_notifier (1.16.0)
    uri (0.12.0)
    uri (0.12.1)
    uri_template (0.7.0)
    version_gem (1.1.1)
    version_gem (1.1.2)
    web-push (3.0.0)
      hkdf (~> 1.0)
      jwt (~> 2.0)
@@ -485,24 +489,24 @@ GEM
      hashdiff (>= 0.4.0, < 2.0.0)
    webrick (1.7.0)
    websocket (1.2.9)
    xorcist (1.1.3)
    xpath (3.2.0)
      nokogiri (~> 1.8)
    yaml-lint (0.1.2)
    zeitwerk (2.6.6)
    yard (0.9.34)
    zeitwerk (2.6.7)

PLATFORMS
  ruby

DEPENDENCIES
  actionmailer (= 7.0.4.1)
  actionpack (= 7.0.4.1)
  actionview (= 7.0.4.1)
  actionmailer (= 7.0.4.3)
  actionpack (= 7.0.4.3)
  actionview (= 7.0.4.3)
  actionview_precompiler
  active_model_serializers (~> 0.8.3)
  activemodel (= 7.0.4.1)
  activerecord (= 7.0.4.1)
  activesupport (= 7.0.4.1)
  activemodel (= 7.0.4.3)
  activerecord (= 7.0.4.3)
  activesupport (= 7.0.4.3)
  addressable
  annotate
  aws-sdk-s3
@@ -520,6 +524,8 @@ DEPENDENCIES
  cose
  cppjieba_rb
  css_parser
  dartsass-ruby
  dartsass-sprockets
  diffy
  digest
  discourse-fonts
@@ -551,7 +557,7 @@ DEPENDENCIES
  loofah
  lru_redux
  lz4-ruby
  mail!
  mail
  maxminddb
  memory_profiler
  message_bus
@@ -581,13 +587,12 @@ DEPENDENCIES
  pry-byebug
  pry-rails
  puma
  r2
  rack
  rack-mini-profiler
  rack-protection
  rails_failover
  rails_multisite
  railties (= 7.0.4.1)
  railties (= 7.0.4.3)
  rake
  rb-fsevent
  rbtrace
@@ -602,13 +607,12 @@ DEPENDENCIES
  rspec-rails
  rss
  rswag-specs
  rtlcss
  rubocop-discourse
  ruby-prof
  ruby-readability
  rubyzip
  sanitize
  sassc (= 2.0.1)
  sassc-rails
  selenium-webdriver
  shoulda-matchers
  sidekiq
@@ -621,6 +625,7 @@ DEPENDENCIES
  syntax_tree-disable_ternary
  test-prof
  thor
  tzinfo-data
  uglifier
  unf
  unicorn
@@ -628,8 +633,8 @@ DEPENDENCIES
  webdrivers
  webmock
  webrick
  xorcist
  yaml-lint
  yard

BUNDLED WITH
   2.4.6
   2.4.10
Loading