diff --git a/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix b/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix index df908dcb6b6d..ca7971ea9779 100644 --- a/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix +++ b/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix @@ -5,6 +5,7 @@ in { discourse-bbcode-color = callPackage ./discourse-bbcode-color { }; discourse-docs = callPackage ./discourse-docs { }; + discourse-events = callPackage ./discourse-events { }; discourse-ldap-auth = callPackage ./discourse-ldap-auth { }; discourse-prometheus = callPackage ./discourse-prometheus { }; discourse-saved-searches = callPackage ./discourse-saved-searches { }; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-events/Gemfile b/pkgs/servers/web-apps/discourse/plugins/discourse-events/Gemfile new file mode 100644 index 000000000000..abd2e7688bb7 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-events/Gemfile @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +# gem "rails" +gem "discourse_subscription_client", "0.1.11" +gem "iso-639", "0.3.5" +gem "ice_cube", "0.16.4" +gem "icalendar", "2.8.0" +gem "icalendar-recurrence", "1.1.3" diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-events/Gemfile.lock b/pkgs/servers/web-apps/discourse/plugins/discourse-events/Gemfile.lock new file mode 100644 index 000000000000..bfe659db2b0b --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-events/Gemfile.lock @@ -0,0 +1,24 @@ +GEM + remote: https://rubygems.org/ + specs: + discourse_subscription_client (0.1.11) + icalendar (2.8.0) + ice_cube (~> 0.16) + icalendar-recurrence (1.1.3) + icalendar (~> 2.0) + ice_cube (~> 0.16) + ice_cube (0.16.4) + iso-639 (0.3.5) + +PLATFORMS + ruby + +DEPENDENCIES + discourse_subscription_client (= 0.1.11) + icalendar (= 2.8.0) + icalendar-recurrence (= 1.1.3) + ice_cube (= 0.16.4) + iso-639 (= 0.3.5) + +BUNDLED WITH + 2.5.22 diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-events/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-events/default.nix new file mode 100644 index 000000000000..2c7b8f8ec870 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-events/default.nix @@ -0,0 +1,22 @@ +{ + lib, + mkDiscoursePlugin, + fetchFromGitHub, +}: + +mkDiscoursePlugin { + name = "discourse-events"; + bundlerEnvArgs.gemdir = ./.; + src = fetchFromGitHub { + owner = "angusmcleod"; + repo = "discourse-events"; + rev = "83a6ee2c36a83bdb21fc58e3ec4bbd5fd5953e2e"; + sha256 = "sha256-QNcP32JYaon7phv3sFi1vlWZNwuL+LDzRWe6vi2FwTE="; + }; + meta = { + homepage = "https://github.com/angusmcleod/discourse-events"; + maintainers = [ lib.maintainers.leona ]; + license = lib.licenses.gpl2Plus; + description = "Discourse plugin to manage events"; + }; +} diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-events/gemset.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-events/gemset.nix new file mode 100644 index 000000000000..f783f52d2ee9 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-events/gemset.nix @@ -0,0 +1,57 @@ +{ + discourse_subscription_client = { + groups = [ "default" ]; + platforms = [ ]; + source = { + remotes = [ "https://rubygems.org" ]; + sha256 = "13vmi645ilsqjalz04738d8ng9zxhw5nd5s80lwcdd87dpzmkk3v"; + type = "gem"; + }; + version = "0.1.11"; + }; + icalendar = { + dependencies = [ "ice_cube" ]; + groups = [ "default" ]; + platforms = [ ]; + source = { + remotes = [ "https://rubygems.org" ]; + sha256 = "11zfs0l8y2a6gpf0krm91d0ap2mnf04qky89dyzxwaspqxqgj174"; + type = "gem"; + }; + version = "2.8.0"; + }; + icalendar-recurrence = { + dependencies = [ + "icalendar" + "ice_cube" + ]; + groups = [ "default" ]; + platforms = [ ]; + source = { + remotes = [ "https://rubygems.org" ]; + sha256 = "06li3cdbwkd9y2sadjlbwj54blqdaa056yx338s4ddfxywrngigh"; + type = "gem"; + }; + version = "1.1.3"; + }; + ice_cube = { + groups = [ "default" ]; + platforms = [ ]; + source = { + remotes = [ "https://rubygems.org" ]; + sha256 = "1dri4mcya1fwzrr9nzic8hj1jr28a2szjag63f9k7p2bw9fpw4fs"; + type = "gem"; + }; + version = "0.16.4"; + }; + iso-639 = { + groups = [ "default" ]; + platforms = [ ]; + source = { + remotes = [ "https://rubygems.org" ]; + sha256 = "1k1r8wgk6syvpsl3j5qfh5az5w4zdvk0pvpjl7qspznfdbp2mn71"; + type = "gem"; + }; + version = "0.3.5"; + }; +} diff --git a/pkgs/servers/web-apps/discourse/update.py b/pkgs/servers/web-apps/discourse/update.py index fd774b902274..4db0e88fe970 100755 --- a/pkgs/servers/web-apps/discourse/update.py +++ b/pkgs/servers/web-apps/discourse/update.py @@ -282,6 +282,7 @@ def update_plugins(): plugins = [ {'name': 'discourse-bbcode-color'}, {'name': 'discourse-docs'}, + {'name': 'discourse-events', 'owner': 'angusmcleod'}, {'name': 'discourse-ldap-auth', 'owner': 'jonmbake'}, {'name': 'discourse-prometheus'}, {'name': 'discourse-saved-searches'}, @@ -402,7 +403,7 @@ def update_plugins(): plugin_file = plugin_file.replace(",\n", ", ") # fix split lines for line in plugin_file.splitlines(): if 'gem ' in line: - line = ','.join(filter(lambda x: ":require_name" not in x, line.split(','))) + line = ','.join(filter(lambda x: ":require_name" not in x and "require_name:" not in x, line.split(','))) gemfile_text = gemfile_text + line + os.linesep version_file_match = version_file_regex.match(line)