From 9af3672f4faaafba0ce0129a87fc7925c14eeb61 Mon Sep 17 00:00:00 2001 From: talyz Date: Wed, 23 Jun 2021 18:15:14 +0200 Subject: [PATCH 1/3] discourse: Fix plugin support For plugins to work properly, their assets need to be precompiled along with the rest of Discourse's assets. This means we need to build new packages when the list of plugins change. --- nixos/modules/services/web-apps/discourse.nix | 5 +++-- pkgs/servers/web-apps/discourse/default.nix | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/web-apps/discourse.nix b/nixos/modules/services/web-apps/discourse.nix index 49958fc6190c..00a269ba871d 100644 --- a/nixos/modules/services/web-apps/discourse.nix +++ b/nixos/modules/services/web-apps/discourse.nix @@ -30,6 +30,9 @@ in package = lib.mkOption { type = lib.types.package; default = pkgs.discourse; + apply = p: p.override { + plugins = lib.unique (p.enabledPlugins ++ cfg.plugins); + }; defaultText = "pkgs.discourse"; description = '' The discourse package to use. @@ -731,8 +734,6 @@ in cp -r ${cfg.package}/share/discourse/config.dist/* /run/discourse/config/ cp -r ${cfg.package}/share/discourse/public.dist/* /run/discourse/public/ - cp -r ${cfg.package}/share/discourse/plugins.dist/* /run/discourse/plugins/ - ${lib.concatMapStringsSep "\n" (p: "ln -sf ${p} /run/discourse/plugins/") cfg.plugins} ln -sf /var/lib/discourse/uploads /run/discourse/public/uploads ln -sf /var/lib/discourse/backups /run/discourse/public/backups diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix index 5e7c4d5368a4..8258049a4034 100644 --- a/pkgs/servers/web-apps/discourse/default.nix +++ b/pkgs/servers/web-apps/discourse/default.nix @@ -3,6 +3,8 @@ , util-linux, gawk, imagemagick, optipng, pngquant, libjpeg, jpegoptim , gifsicle, libpsl, redis, postgresql, which, brotli, procps, rsync , nodePackages, v8 + +, plugins ? [] }: let @@ -148,6 +150,8 @@ let mkdir $NIX_BUILD_TOP/tmp_home export HOME=$NIX_BUILD_TOP/tmp_home + ${lib.concatMapStringsSep "\n" (p: "cp -r ${p} plugins/") plugins} + export RAILS_ENV=production bundle exec rake db:migrate >/dev/null @@ -212,7 +216,6 @@ let mv config config.dist mv public public.dist - mv plugins plugins.dist runHook postBuild ''; @@ -230,6 +233,7 @@ let ln -sf /run/discourse/public $out/share/discourse/public ln -sf /run/discourse/plugins $out/share/discourse/plugins ln -sf ${assets} $out/share/discourse/public.dist/assets + ${lib.concatMapStringsSep "\n" (p: "ln -sf ${p} $out/share/discourse/plugins/") plugins} runHook postInstall ''; @@ -244,6 +248,7 @@ let passthru = { inherit rubyEnv runtimeEnv runtimeDeps rake; + enabledPlugins = plugins; ruby = rubyEnv.wrappedRuby; tests = nixosTests.discourse; }; From f0ae7fdf7e9518ab1fef4603daa860d5402f5b3b Mon Sep 17 00:00:00 2001 From: talyz Date: Thu, 24 Jun 2021 19:34:38 +0200 Subject: [PATCH 2/3] discourse: Patch sources instead of using replace-literal --- pkgs/servers/web-apps/discourse/default.nix | 6 +++-- .../discourse/use_mv_instead_of_rename.patch | 22 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 pkgs/servers/web-apps/discourse/use_mv_instead_of_rename.patch diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix index 8258049a4034..698f3d6a6b26 100644 --- a/pkgs/servers/web-apps/discourse/default.nix +++ b/pkgs/servers/web-apps/discourse/default.nix @@ -199,6 +199,10 @@ let # Log Unicorn messages to the journal and make request timeout # configurable ./unicorn_logging_and_timeout.patch + + # Use mv instead of rename, since rename doesn't work across + # device boundaries + ./use_mv_instead_of_rename.patch ]; postPatch = '' @@ -207,8 +211,6 @@ let # warnings and means we don't have to link back to lib from the # state directory. find config -type f -execdir sed -Ei "s,(\.\./)+(lib|app)/,$out/share/discourse/\2/," {} \; - - ${replace}/bin/replace-literal -f -r -e 'File.rename(temp_destination, destination)' "FileUtils.mv(temp_destination, destination)" . ''; buildPhase = '' diff --git a/pkgs/servers/web-apps/discourse/use_mv_instead_of_rename.patch b/pkgs/servers/web-apps/discourse/use_mv_instead_of_rename.patch new file mode 100644 index 000000000000..30493b543e38 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/use_mv_instead_of_rename.patch @@ -0,0 +1,22 @@ +diff --git a/lib/discourse.rb b/lib/discourse.rb +index ea2a3cbafd..66454d9157 100644 +--- a/lib/discourse.rb ++++ b/lib/discourse.rb +@@ -62,7 +62,7 @@ module Discourse + fd.fsync() + end + +- File.rename(temp_destination, destination) ++ FileUtils.mv(temp_destination, destination) + + nil + end +@@ -76,7 +76,7 @@ module Discourse + FileUtils.mkdir_p(File.join(Rails.root, 'tmp')) + temp_destination = File.join(Rails.root, 'tmp', SecureRandom.hex) + execute_command('ln', '-s', source, temp_destination) +- File.rename(temp_destination, destination) ++ FileUtils.mv(temp_destination, destination) + + nil + end From 7671b90919af8271bdf7e07bb86d63216a2145d6 Mon Sep 17 00:00:00 2001 From: talyz Date: Thu, 24 Jun 2021 19:45:37 +0200 Subject: [PATCH 3/3] discourse: Add a proper plugin builder + a few initial packages Some discourse plugins have Ruby dependencies and require a specialized builder. This introduces a generic builder that can be used whether the plugin has Ruby dependencies or not. It also adds a set of pre-packaged plugins available through `discourse.plugins` and provides an easy way to add more. --- pkgs/servers/web-apps/discourse/default.nix | 55 +++++++- .../discourse/plugin_gem_api_version.patch | 13 ++ .../discourse/plugins/all-plugins.nix | 12 ++ .../discourse-canned-replies/default.nix | 11 ++ .../plugins/discourse-github/Gemfile | 3 + .../plugins/discourse-github/Gemfile.lock | 37 +++++ .../plugins/discourse-github/default.nix | 12 ++ .../plugins/discourse-github/gemset.nix | 126 ++++++++++++++++++ .../plugins/discourse-math/default.nix | 11 ++ .../plugins/discourse-solved/default.nix | 11 ++ .../discourse-spoiler-alert/default.nix | 11 ++ .../discourse-yearly-review/default.nix | 11 ++ 12 files changed, 306 insertions(+), 7 deletions(-) create mode 100644 pkgs/servers/web-apps/discourse/plugin_gem_api_version.patch create mode 100644 pkgs/servers/web-apps/discourse/plugins/all-plugins.nix create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-canned-replies/default.nix create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-github/Gemfile create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-github/Gemfile.lock create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-github/default.nix create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-github/gemset.nix create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-math/default.nix create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-solved/default.nix create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-spoiler-alert/default.nix create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-yearly-review/default.nix diff --git a/pkgs/servers/web-apps/discourse/default.nix b/pkgs/servers/web-apps/discourse/default.nix index 698f3d6a6b26..5a3301040d33 100644 --- a/pkgs/servers/web-apps/discourse/default.nix +++ b/pkgs/servers/web-apps/discourse/default.nix @@ -1,8 +1,9 @@ { stdenv, makeWrapper, runCommandNoCC, lib, nixosTests, writeShellScript -, fetchFromGitHub, bundlerEnv, ruby, replace, gzip, gnutar, git, cacert -, util-linux, gawk, imagemagick, optipng, pngquant, libjpeg, jpegoptim -, gifsicle, libpsl, redis, postgresql, which, brotli, procps, rsync -, nodePackages, v8 +, fetchFromGitHub, bundlerEnv, callPackage + +, ruby, replace, gzip, gnutar, git, cacert, util-linux, gawk +, imagemagick, optipng, pngquant, libjpeg, jpegoptim, gifsicle, libpsl +, redis, postgresql, which, brotli, procps, rsync, nodePackages, v8 , plugins ? [] }: @@ -48,6 +49,35 @@ let UNICORN_LISTENER = "/run/discourse/sockets/unicorn.sock"; }; + mkDiscoursePlugin = + { name ? null + , pname ? null + , version ? null + , meta ? null + , bundlerEnvArgs ? {} + , src + , ... + }@args: + let + rubyEnv = bundlerEnv (bundlerEnvArgs // { + inherit name pname version ruby; + }); + in + stdenv.mkDerivation (builtins.removeAttrs args [ "bundlerEnvArgs" ] // { + inherit name pname version src meta; + pluginName = if name != null then name else "${pname}-${version}"; + phases = [ "unpackPhase" "installPhase" ]; + installPhase = '' + runHook preInstall + mkdir -p $out + cp -r * $out/ + '' + lib.optionalString (bundlerEnvArgs != {}) '' + ln -sf ${rubyEnv}/lib/ruby/gems $out/gems + '' + '' + runHook postInstall + ''; + }); + rake = runCommandNoCC "discourse-rake" { nativeBuildInputs = [ makeWrapper ]; } '' @@ -123,6 +153,12 @@ let nodePackages.uglify-js ]; + patches = [ + # Use the Ruby API version in the plugin gem path, to match the + # one constructed by bundlerEnv + ./plugin_gem_api_version.patch + ]; + # We have to set up an environment that is close enough to # production ready or the assets:precompile task refuses to # run. This means that Redis and PostgreSQL has to be running and @@ -150,7 +186,7 @@ let mkdir $NIX_BUILD_TOP/tmp_home export HOME=$NIX_BUILD_TOP/tmp_home - ${lib.concatMapStringsSep "\n" (p: "cp -r ${p} plugins/") plugins} + ${lib.concatMapStringsSep "\n" (p: "ln -sf ${p} plugins/${p.pluginName or ""}") plugins} export RAILS_ENV=production @@ -200,6 +236,10 @@ let # configurable ./unicorn_logging_and_timeout.patch + # Use the Ruby API version in the plugin gem path, to match the + # one constructed by bundlerEnv + ./plugin_gem_api_version.patch + # Use mv instead of rename, since rename doesn't work across # device boundaries ./use_mv_instead_of_rename.patch @@ -235,7 +275,7 @@ let ln -sf /run/discourse/public $out/share/discourse/public ln -sf /run/discourse/plugins $out/share/discourse/plugins ln -sf ${assets} $out/share/discourse/public.dist/assets - ${lib.concatMapStringsSep "\n" (p: "ln -sf ${p} $out/share/discourse/plugins/") plugins} + ${lib.concatMapStringsSep "\n" (p: "ln -sf ${p} $out/share/discourse/plugins/${p.pluginName or ""}") plugins} runHook postInstall ''; @@ -249,8 +289,9 @@ let }; passthru = { - inherit rubyEnv runtimeEnv runtimeDeps rake; + inherit rubyEnv runtimeEnv runtimeDeps rake mkDiscoursePlugin; enabledPlugins = plugins; + plugins = callPackage ./plugins/all-plugins.nix { inherit mkDiscoursePlugin; }; ruby = rubyEnv.wrappedRuby; tests = nixosTests.discourse; }; diff --git a/pkgs/servers/web-apps/discourse/plugin_gem_api_version.patch b/pkgs/servers/web-apps/discourse/plugin_gem_api_version.patch new file mode 100644 index 000000000000..ca7aa850ec51 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugin_gem_api_version.patch @@ -0,0 +1,13 @@ +diff --git a/lib/plugin_gem.rb b/lib/plugin_gem.rb +index 855d1aca2c..8115623547 100644 +--- a/lib/plugin_gem.rb ++++ b/lib/plugin_gem.rb +@@ -4,7 +4,7 @@ module PluginGem + def self.load(path, name, version, opts = nil) + opts ||= {} + +- gems_path = File.dirname(path) + "/gems/#{RUBY_VERSION}" ++ gems_path = File.dirname(path) + "/gems/#{Gem.ruby_api_version}" + + spec_path = gems_path + "/specifications" + diff --git a/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix b/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix new file mode 100644 index 000000000000..e6640cbbe975 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix @@ -0,0 +1,12 @@ +{ mkDiscoursePlugin, newScope, fetchFromGitHub, ... }@args: +let + callPackage = newScope args; +in +{ + discourse-spoiler-alert = callPackage ./discourse-spoiler-alert {}; + discourse-solved = callPackage ./discourse-solved {}; + discourse-canned-replies = callPackage ./discourse-canned-replies {}; + discourse-math = callPackage ./discourse-math {}; + discourse-github = callPackage ./discourse-github {}; + discourse-yearly-review = callPackage ./discourse-yearly-review {}; +} diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-canned-replies/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-canned-replies/default.nix new file mode 100644 index 000000000000..05c153cd70b1 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-canned-replies/default.nix @@ -0,0 +1,11 @@ +{ mkDiscoursePlugin, fetchFromGitHub }: + +mkDiscoursePlugin { + name = "discourse-canned-replies"; + src = fetchFromGitHub { + owner = "discourse"; + repo = "discourse-canned-replies"; + rev = "7ee748f18a276aca42185e2079c1d4cadeecdaf8"; + sha256 = "0j10kxfr6v2rdd58smg2i7iac46z74qnnjk8b91jd1svazhis1ph"; + }; +} diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-github/Gemfile b/pkgs/servers/web-apps/discourse/plugins/discourse-github/Gemfile new file mode 100644 index 000000000000..f0205f4ff1df --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-github/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gem 'sawyer', '0.8.2' +gem 'octokit', '4.21.0' diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-github/Gemfile.lock b/pkgs/servers/web-apps/discourse/plugins/discourse-github/Gemfile.lock new file mode 100644 index 000000000000..f28833a35c0f --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-github/Gemfile.lock @@ -0,0 +1,37 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + faraday (1.4.2) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) + multipart-post (>= 1.2, < 3) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.1.0) + multipart-post (2.1.1) + octokit (4.21.0) + faraday (>= 0.9) + sawyer (~> 0.8.0, >= 0.5.3) + public_suffix (4.0.6) + ruby2_keywords (0.0.4) + sawyer (0.8.2) + addressable (>= 2.3.5) + faraday (> 0.8, < 2.0) + +PLATFORMS + ruby + +DEPENDENCIES + octokit (= 4.21.0) + sawyer (= 0.8.2) + +BUNDLED WITH + 2.1.4 diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-github/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-github/default.nix new file mode 100644 index 000000000000..e5d8cff0a9fd --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-github/default.nix @@ -0,0 +1,12 @@ +{ mkDiscoursePlugin, fetchFromGitHub }: + +mkDiscoursePlugin { + name = "discourse-github"; + bundlerEnvArgs.gemdir = ./.; + src = fetchFromGitHub { + owner = "discourse"; + repo = "discourse-github"; + rev = "151e353a5a1971157c70c2e2b0f56387f212a81f"; + sha256 = "00kra6zd2k1f2vwcdvxnxnammzh72f5qxcqbb94m0z6maj598wdy"; + }; +} diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-github/gemset.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-github/gemset.nix new file mode 100644 index 000000000000..bad1f9629578 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-github/gemset.nix @@ -0,0 +1,126 @@ +{ + addressable = { + dependencies = ["public_suffix"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"; + type = "gem"; + }; + version = "2.7.0"; + }; + faraday = { + dependencies = ["faraday-em_http" "faraday-em_synchrony" "faraday-excon" "faraday-net_http" "faraday-net_http_persistent" "multipart-post" "ruby2_keywords"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "07mhk70gv453pg38md346470hknyhipdqppnplq706ll3k3lzb7v"; + type = "gem"; + }; + version = "1.4.2"; + }; + faraday-em_http = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "12cnqpbak4vhikrh2cdn94assh3yxza8rq2p9w2j34bqg5q4qgbs"; + type = "gem"; + }; + version = "1.0.0"; + }; + faraday-em_synchrony = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1vgrbhkp83sngv6k4mii9f2s9v5lmp693hylfxp2ssfc60fas3a6"; + type = "gem"; + }; + version = "1.0.0"; + }; + faraday-excon = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0h09wkb0k0bhm6dqsd47ac601qiaah8qdzjh8gvxfd376x1chmdh"; + type = "gem"; + }; + version = "1.1.0"; + }; + faraday-net_http = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1fi8sda5hc54v1w3mqfl5yz09nhx35kglyx72w7b8xxvdr0cwi9j"; + type = "gem"; + }; + version = "1.0.1"; + }; + faraday-net_http_persistent = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0l2c835wl7gv34xp49fhd1bl4czkpw2g3ahqsak2251iqv5589ka"; + type = "gem"; + }; + version = "1.1.0"; + }; + multipart-post = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1zgw9zlwh2a6i1yvhhc4a84ry1hv824d6g2iw2chs3k5aylpmpfj"; + type = "gem"; + }; + version = "2.1.1"; + }; + octokit = { + dependencies = ["faraday" "sawyer"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0ak64rb48d8z98nw6q70r6i0i3ivv61iqla40ss5l79491qfnn27"; + type = "gem"; + }; + version = "4.21.0"; + }; + public_suffix = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1xqcgkl7bwws1qrlnmxgh8g4g9m10vg60bhlw40fplninb3ng6d9"; + type = "gem"; + }; + version = "4.0.6"; + }; + ruby2_keywords = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "15wfcqxyfgka05v2a7kpg64x57gl1y4xzvnc9lh60bqx5sf1iqrs"; + type = "gem"; + }; + version = "0.0.4"; + }; + sawyer = { + dependencies = ["addressable" "faraday"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0yrdchs3psh583rjapkv33mljdivggqn99wkydkjdckcjn43j3cz"; + type = "gem"; + }; + version = "0.8.2"; + }; +} diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-math/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-math/default.nix new file mode 100644 index 000000000000..8cf2a4abc0d1 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-math/default.nix @@ -0,0 +1,11 @@ +{ mkDiscoursePlugin, fetchFromGitHub }: + +mkDiscoursePlugin { + name = "discourse-math"; + src = fetchFromGitHub { + owner = "discourse"; + repo = "discourse-math"; + rev = "143ddea4558ea9a1b3fd71635bc11e055763c8e7"; + sha256 = "18pq5ybl3g34i39cpixc3nszvq8gx5yji58zlbbl6428mm011cbx"; + }; +} diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-solved/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-solved/default.nix new file mode 100644 index 000000000000..c382a83d0893 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-solved/default.nix @@ -0,0 +1,11 @@ +{ mkDiscoursePlugin, fetchFromGitHub }: + +mkDiscoursePlugin { + name = "discourse-solved"; + src = fetchFromGitHub { + owner = "discourse"; + repo = "discourse-solved"; + rev = "179611766d53974308e6f7def21836997c3c55fc"; + sha256 = "sha256:1s77h42d3bv2lqw33akxh8ss482vxnz4d7qz6xicwqfwv34qjf03"; + }; +} diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-spoiler-alert/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-spoiler-alert/default.nix new file mode 100644 index 000000000000..8eba43e47e40 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-spoiler-alert/default.nix @@ -0,0 +1,11 @@ +{ mkDiscoursePlugin, fetchFromGitHub }: + +mkDiscoursePlugin { + name = "discourse-spoiler-alert"; + src = fetchFromGitHub { + owner = "discourse"; + repo = "discourse-spoiler-alert"; + rev = "e200cfa571d252cab63f3d30d619b370986e4cee"; + sha256 = "0ya69ix5g77wz4c9x9gmng6l25ghb5xxlx3icr6jam16q14dzc33"; + }; +} diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-yearly-review/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-yearly-review/default.nix new file mode 100644 index 000000000000..8e76123ae593 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-yearly-review/default.nix @@ -0,0 +1,11 @@ +{ mkDiscoursePlugin, fetchFromGitHub }: + +mkDiscoursePlugin { + name = "discourse-yearly-review"; + src = fetchFromGitHub { + owner = "discourse"; + repo = "discourse-yearly-review"; + rev = "d1471bdb68945f55342e72e2c525b4f628419a50"; + sha256 = "sha256:0xpl0l1vpih8xzb6y7k1lm72nj4ya99378viyhqfvpwzsn5pha2a"; + }; +}