From eb02dc0c4a14d5a15f3443567bc12abf631c300a Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Mon, 2 Aug 2021 14:54:52 -0700 Subject: [PATCH 1/4] discourseAllPlugins: init discourse-checklist --- .../web-apps/discourse/plugins/all-plugins.nix | 1 + .../plugins/discourse-checklist/default.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-checklist/default.nix diff --git a/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix b/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix index e762d3907f7e..bd082bc5a988 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-calendar = callPackage ./discourse-calendar {}; discourse-canned-replies = callPackage ./discourse-canned-replies {}; + discourse-checklist = callPackage ./discourse-checklist {}; discourse-github = callPackage ./discourse-github {}; discourse-math = callPackage ./discourse-math {}; discourse-solved = callPackage ./discourse-solved {}; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-checklist/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-checklist/default.nix new file mode 100644 index 000000000000..89edb3f71d7e --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-checklist/default.nix @@ -0,0 +1,17 @@ +{ lib, mkDiscoursePlugin, fetchFromGitHub }: + +mkDiscoursePlugin { + name = "discourse-checklist"; + src = fetchFromGitHub { + owner = "discourse"; + repo = "discourse-checklist"; + rev = "6e7b9c5040c55795c7fd4db9569b3e93dad092c2"; + sha256 = "sha256-2KAVBrfAvhLZC9idi+ijbVqOCq9rSXbDVEOZS+mWJ10="; + }; + meta = with lib; { + homepage = "https://github.com/discourse/discourse-checklist"; + maintainers = with maintainers; [ ryantm ]; + license = licenses.gpl2Only; + description = "A simple checklist rendering plugin for discourse "; + }; +} From 601db31c264f3008c25f3fb13f1968a543a9cfe6 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Mon, 2 Aug 2021 15:01:58 -0700 Subject: [PATCH 2/4] discourseAllPlugins: init discourse-data-explorer --- .../web-apps/discourse/plugins/all-plugins.nix | 1 + .../plugins/discourse-data-explorer/default.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-data-explorer/default.nix diff --git a/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix b/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix index bd082bc5a988..bc3f3b3ed5ad 100644 --- a/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix +++ b/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix @@ -6,6 +6,7 @@ in discourse-calendar = callPackage ./discourse-calendar {}; discourse-canned-replies = callPackage ./discourse-canned-replies {}; discourse-checklist = callPackage ./discourse-checklist {}; + discourse-data-explorer = callPackage ./discourse-data-explorer {}; discourse-github = callPackage ./discourse-github {}; discourse-math = callPackage ./discourse-math {}; discourse-solved = callPackage ./discourse-solved {}; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-data-explorer/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-data-explorer/default.nix new file mode 100644 index 000000000000..983c8b7fe83f --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-data-explorer/default.nix @@ -0,0 +1,17 @@ +{ lib, mkDiscoursePlugin, fetchFromGitHub }: + +mkDiscoursePlugin { + name = "discourse-data-explorer"; + src = fetchFromGitHub { + owner = "discourse"; + repo = "discourse-data-explorer"; + rev = "7a348aaa8b2a6b3a75db72e99a7370a1a6fcb2b8"; + sha256 = "sha256-4X0oor3dIKrQO5IrScQ9+DBr39R7PJJ8dg9UQseV6IU="; + }; + meta = with lib; { + homepage = "https://github.com/discourse/discourse-data-explorer"; + maintainers = with maintainers; [ ryantm ]; + license = licenses.mit; + description = "SQL Queries for admins in Discourse"; + }; +} From 85d7eb75c968421ea233f4c8a5b05886733c2dec Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Mon, 2 Aug 2021 15:21:53 -0700 Subject: [PATCH 3/4] discourseAllPlugins: init discourse-migratepassword --- .../discourse/plugins/all-plugins.nix | 1 + .../plugins/discourse-migratepassword/Gemfile | 6 +++++ .../discourse-migratepassword/Gemfile.lock | 15 +++++++++++++ .../discourse-migratepassword/default.nix | 18 +++++++++++++++ .../discourse-migratepassword/gemset.nix | 22 +++++++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/Gemfile create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/Gemfile.lock create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/default.nix create mode 100644 pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/gemset.nix diff --git a/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix b/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix index bc3f3b3ed5ad..27c749dea2e1 100644 --- a/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix +++ b/pkgs/servers/web-apps/discourse/plugins/all-plugins.nix @@ -9,6 +9,7 @@ in discourse-data-explorer = callPackage ./discourse-data-explorer {}; discourse-github = callPackage ./discourse-github {}; discourse-math = callPackage ./discourse-math {}; + discourse-migratepassword = callPackage ./discourse-migratepassword {}; discourse-solved = callPackage ./discourse-solved {}; discourse-spoiler-alert = callPackage ./discourse-spoiler-alert {}; discourse-yearly-review = callPackage ./discourse-yearly-review {}; diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/Gemfile b/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/Gemfile new file mode 100644 index 000000000000..0fcdf01d56f9 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/Gemfile @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem 'bcrypt', '3.1.3' +gem 'unix-crypt', '1.3.0' diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/Gemfile.lock b/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/Gemfile.lock new file mode 100644 index 000000000000..2c9fb9049304 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/Gemfile.lock @@ -0,0 +1,15 @@ +GEM + remote: https://rubygems.org/ + specs: + bcrypt (3.1.3) + unix-crypt (1.3.0) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + bcrypt (= 3.1.3) + unix-crypt (= 1.3.0) + +BUNDLED WITH + 2.2.20 diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/default.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/default.nix new file mode 100644 index 000000000000..4c46dfb181e7 --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/default.nix @@ -0,0 +1,18 @@ +{ lib, mkDiscoursePlugin, fetchFromGitHub }: + +mkDiscoursePlugin { + name = "discourse-migratepassword"; + bundlerEnvArgs.gemdir = ./.; + src = fetchFromGitHub { + owner = "communiteq"; + repo = "discourse-migratepassword"; + rev = "91d6a008de91853becca01846aa4662bd227670e"; + sha256 = "sha256-aKj0zXyXDnG20qVdhGvn4fwXiBeHFj2pv4bTUP81MP0="; + }; + meta = with lib; { + homepage = "https://github.com/communiteq/discourse-migratepassword"; + maintainers = with maintainers; [ ryantm ]; + license = licenses.gpl2Only; + description = "Support migrated password hashes"; + }; +} diff --git a/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/gemset.nix b/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/gemset.nix new file mode 100644 index 000000000000..22b4053bbd4e --- /dev/null +++ b/pkgs/servers/web-apps/discourse/plugins/discourse-migratepassword/gemset.nix @@ -0,0 +1,22 @@ +{ + bcrypt = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1d2gqv8vry4ps0asb7nn1z4zxi3mcscy7yrim0npdd294ffyinvj"; + type = "gem"; + }; + version = "3.1.3"; + }; + unix-crypt = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1wflipsmmicmgvqilp9pml4x19b337kh6p6jgrzqrzpkq2z52gdq"; + type = "gem"; + }; + version = "1.3.0"; + }; +} From 32e24e792caefa1de46bf20da2ba4d8fbbf035dc Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Thu, 5 Aug 2021 10:16:15 -0700 Subject: [PATCH 4/4] discourse/update.py: add missing plugins --- pkgs/servers/web-apps/discourse/update.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/web-apps/discourse/update.py b/pkgs/servers/web-apps/discourse/update.py index ae4dadfc3a73..4832e8638ead 100755 --- a/pkgs/servers/web-apps/discourse/update.py +++ b/pkgs/servers/web-apps/discourse/update.py @@ -187,9 +187,13 @@ def update_plugins(): """ plugins = [ + {'name': 'discourse-calendar'}, {'name': 'discourse-canned-replies'}, + {'name': 'discourse-checklist'}, + {'name': 'discourse-data-explorer'}, {'name': 'discourse-github'}, {'name': 'discourse-math'}, + {'name': 'discourse-migratepassword', 'owner': 'discoursehosting'}, {'name': 'discourse-solved'}, {'name': 'discourse-spoiler-alert'}, {'name': 'discourse-yearly-review'},