push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
Run the nixpkgs/pkgs/servers/web-apps/discourse/update.py script to
update plugins! See the Plugins section of the Discourse chapter in
the NixOS manual (https://nixos.org/manual/nixos/unstable/index.html#module-services-discourse)
for more info.

View File

@@ -0,0 +1,27 @@
{ mkDiscoursePlugin, newScope, ... }@args:
let
callPackage = newScope args;
in
{
discourse-assign = callPackage ./discourse-assign { };
discourse-bbcode-color = callPackage ./discourse-bbcode-color { };
discourse-calendar = callPackage ./discourse-calendar { };
discourse-canned-replies = callPackage ./discourse-canned-replies { };
discourse-chat-integration = callPackage ./discourse-chat-integration { };
discourse-checklist = callPackage ./discourse-checklist { };
discourse-data-explorer = callPackage ./discourse-data-explorer { };
discourse-docs = callPackage ./discourse-docs { };
discourse-github = callPackage ./discourse-github { };
discourse-ldap-auth = callPackage ./discourse-ldap-auth { };
discourse-math = callPackage ./discourse-math { };
discourse-migratepassword = callPackage ./discourse-migratepassword { };
discourse-oauth2-basic = callPackage ./discourse-oauth2-basic { };
discourse-openid-connect = callPackage ./discourse-openid-connect { };
discourse-prometheus = callPackage ./discourse-prometheus { };
discourse-reactions = callPackage ./discourse-reactions { };
discourse-saved-searches = callPackage ./discourse-saved-searches { };
discourse-solved = callPackage ./discourse-solved { };
discourse-spoiler-alert = callPackage ./discourse-spoiler-alert { };
discourse-voting = callPackage ./discourse-voting { };
discourse-yearly-review = callPackage ./discourse-yearly-review { };
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-assign";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-assign";
rev = "261a47d119d200a8d922d008ad3d1667df869435";
sha256 = "sha256-0OClWO70btM7EN7Vir1LIhCTeO5+2jtkP4RozoKzp+0=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-docs";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "Discourse Plugin for assigning users to a topic";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-bbcode-color";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-bbcode-color";
rev = "ecd4befeb4eae48aa0a37a88e5aca60e59730411";
sha256 = "sha256-enpeXc6pE9+5EdbMIFsnWd++ixlHBKFRxbXmvJYJftg=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-bbcode-color";
maintainers = with maintainers; [ ryantm ];
license = licenses.mit;
description = "Support BBCode color tags";
};
}

View File

@@ -0,0 +1,6 @@
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem "rrule", "0.4.4", require: false

View File

@@ -0,0 +1,35 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.3)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
base64 (0.2.0)
bigdecimal (3.1.8)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
drb (2.2.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
minitest (5.23.1)
mutex_m (0.2.0)
rrule (0.4.4)
activesupport (>= 2.3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
PLATFORMS
ruby
DEPENDENCIES
rrule (= 0.4.4)
BUNDLED WITH
2.5.9

View File

@@ -0,0 +1,22 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-calendar";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-calendar";
rev = "8d09cf8503b78f4c72b47a7319c0f4b9ad0247e7";
sha256 = "sha256-ES0/f/sv4Doao/MOdHYMwadRIVXb1I7FgSsl7790tio=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-calendar";
maintainers = with maintainers; [ ryantm ];
license = licenses.mit;
description = "Adds the ability to create a dynamic calendar in the first post of a topic";
};
}

View File

@@ -0,0 +1,126 @@
{
activesupport = {
dependencies = [
"base64"
"bigdecimal"
"concurrent-ruby"
"connection_pool"
"drb"
"i18n"
"minitest"
"mutex_m"
"tzinfo"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0z8kygxmz99krz9pwp947znkzf0jr64sml28df0vf1gzxlg7y57i";
type = "gem";
};
version = "7.1.3.3";
};
base64 = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "01qml0yilb9basf7is2614skjp8384h2pycfx86cr8023arfj98g";
type = "gem";
};
version = "0.2.0";
};
bigdecimal = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1gi7zqgmqwi5lizggs1jhc3zlwaqayy9rx2ah80sxy24bbnng558";
type = "gem";
};
version = "3.1.8";
};
concurrent-ruby = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1qh1b14jwbbj242klkyz5fc7npd4j0mvndz62gajhvl1l3wd7zc2";
type = "gem";
};
version = "1.2.3";
};
connection_pool = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1x32mcpm2cl5492kd6lbjbaf17qsssmpx9kdyr7z1wcif2cwyh0g";
type = "gem";
};
version = "2.4.1";
};
drb = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0h5kbj9hvg5hb3c7l425zpds0vb42phvln2knab8nmazg2zp5m79";
type = "gem";
};
version = "2.2.1";
};
i18n = {
dependencies = [ "concurrent-ruby" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1ffix518y7976qih9k1lgnc17i3v6yrlh0a3mckpxdb4wc2vrp16";
type = "gem";
};
version = "1.14.5";
};
minitest = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1gkslxvkhh44s21rbjvka3zsvfxxrf5pcl6f75rv2vyrzzbgis7i";
type = "gem";
};
version = "5.23.1";
};
mutex_m = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1ma093ayps1m92q845hmpk0dmadicvifkbf05rpq9pifhin0rvxn";
type = "gem";
};
version = "0.2.0";
};
rrule = {
dependencies = [ "activesupport" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "04h3q0ws0wswqj3mwjyv44yx59d9ima9a820ay9w5bwnlb73syj2";
type = "gem";
};
version = "0.4.4";
};
tzinfo = {
dependencies = [ "concurrent-ruby" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "16w2g84dzaf3z13gxyzlzbf748kylk5bdgg3n1ipvkvvqy685bwd";
type = "gem";
};
version = "2.0.6";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-canned-replies";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-canned-replies";
rev = "732598b6cdc86c74622bb15bfeaebb05611bbc25";
sha256 = "sha256-t0emNsPT8o0ralUedt33ufH0VLl4/12lVBBCnzfdRxE=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-canned-replies";
maintainers = with maintainers; [ talyz ];
license = licenses.gpl2Only;
description = "Adds support for inserting a canned reply into the composer window via a UI";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-chat-integration";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-chat-integration";
rev = "29ad813cd04812786780e1706cbc043810dea7d8";
sha256 = "sha256-5mGnHLlw3qIGi8et3WV1RXnrPB+bySi3wQryKTa5wNg=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-chat-integration";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "This plugin integrates Discourse with a number of external chatroom systems";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-checklist";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-checklist";
rev = "6fcf9fed5c3ae3baf9ddd1cca9cef4dc089996c1";
sha256 = "sha256-RIuoqZo7dW1DXbfbWhyyhCOGe4R5sLerzFW2TT0zO6U=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-checklist";
maintainers = with maintainers; [ ryantm ];
license = licenses.gpl2Only;
description = "Simple checklist rendering plugin for discourse";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-data-explorer";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-data-explorer";
rev = "2ba204a1de2638a7959e588b88f3b6c7fcf7a70f";
sha256 = "sha256-u8yGKANEyqm63/ZnJLe3u1nkNGZyX0wFUBIKU5GgjzY=";
};
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";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-docs";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-docs";
rev = "4e42539cda9a54d7827bcdf51b6dfbcf56d24cc9";
sha256 = "sha256-sv9Q0qEQVncQw3QLiro5YfVcHJAG8sJ0GTjduCZ0iP4=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-docs";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "Find and filter knowledge base topics";
};
}

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem "sawyer", "0.9.2"
gem "octokit", "5.6.1"

View File

@@ -0,0 +1,33 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
faraday (2.12.3)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
json (2.10.2)
logger (1.7.0)
net-http (0.6.0)
uri
octokit (5.6.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
public_suffix (6.0.1)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
uri (1.0.3)
PLATFORMS
ruby
DEPENDENCIES
octokit (= 5.6.1)
sawyer (= 0.9.2)
BUNDLED WITH
2.5.22

View File

@@ -0,0 +1,23 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-github";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-github";
rev = "59e5fc5692959c6c564ab0e09de364ccfedd6702";
sha256 = "sha256-b+8eSw8Kbz2CZN16Rd7c8uyH5P1iYhOJmdXu1C5UclU=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-github";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Adds GitHub badges and linkback functionality";
};
}

View File

@@ -0,0 +1,118 @@
{
addressable = {
dependencies = [ "public_suffix" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0cl2qpvwiffym62z991ynks7imsm87qmgxf0yfsmlwzkgi9qcaa6";
type = "gem";
};
version = "2.8.7";
};
faraday = {
dependencies = [
"faraday-net_http"
"json"
"logger"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0dxalpc0ldvjjmd7z95na9lm99d2baz48sf9axk3a6x3pn50ibdi";
type = "gem";
};
version = "2.12.3";
};
faraday-net_http = {
dependencies = [ "net-http" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0jp5ci6g40d6i50bsywp35l97nc2fpi9a592r2cibwicdb6y9wd1";
type = "gem";
};
version = "3.4.0";
};
json = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "01lbdaizhkxmrw4y8j3wpvsryvnvzmg0pfs56c52laq2jgdfmq1l";
type = "gem";
};
version = "2.10.2";
};
logger = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "00q2zznygpbls8asz5knjvvj2brr3ghmqxgr83xnrdj4rk3xwvhr";
type = "gem";
};
version = "1.7.0";
};
net-http = {
dependencies = [ "uri" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1ysrwaabhf0sn24jrp0nnp51cdv0jf688mh5i6fsz63q2c6b48cn";
type = "gem";
};
version = "0.6.0";
};
octokit = {
dependencies = [
"faraday"
"sawyer"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "15g4kyag6gmxxq6d03472h7srm3imlsks1wg6nac7hl3mb1b5vs8";
type = "gem";
};
version = "5.6.1";
};
public_suffix = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0vqcw3iwby3yc6avs1vb3gfd0vcp2v7q310665dvxfswmcf4xm31";
type = "gem";
};
version = "6.0.1";
};
sawyer = {
dependencies = [
"addressable"
"faraday"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1jks1qjbmqm8f9kvwa81vqj39avaj9wdnzc531xm29a55bb74fps";
type = "gem";
};
version = "0.9.2";
};
uri = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "04bhfvc25b07jaiaf62yrach7khhr5jlr5bx6nygg8pf11329wp9";
type = "gem";
};
version = "1.0.3";
};
}

View File

@@ -0,0 +1,8 @@
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem 'pyu-ruby-sasl', '0.0.3.3', require: false
gem 'rubyntlm', '0.3.4', require: false
gem 'net-ldap', '0.18.0'

View File

@@ -0,0 +1,17 @@
GEM
remote: https://rubygems.org/
specs:
net-ldap (0.18.0)
pyu-ruby-sasl (0.0.3.3)
rubyntlm (0.3.4)
PLATFORMS
ruby
DEPENDENCIES
net-ldap (= 0.18.0)
pyu-ruby-sasl (= 0.0.3.3)
rubyntlm (= 0.3.4)
BUNDLED WITH
2.5.22

View File

@@ -0,0 +1,22 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-ldap-auth";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "jonmbake";
repo = "discourse-ldap-auth";
rev = "fa1d661004ca99036ff628a9c4be12a81265d784";
sha256 = "sha256-2DYrYgC3H+e8USoo1MbJin1f5tshIUsQa6J7avnpvEc=";
};
meta = with lib; {
homepage = "https://github.com/jonmbake/discourse-ldap-auth";
maintainers = with maintainers; [ ryantm ];
license = licenses.mit;
description = "Discourse plugin to enable LDAP/Active Directory authentication";
};
}

View File

@@ -0,0 +1,32 @@
{
net-ldap = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0xqcffn3c1564c4fizp10dzw2v5g2pabdzrcn25hq05bqhsckbar";
type = "gem";
};
version = "0.18.0";
};
pyu-ruby-sasl = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1rcpjiz9lrvyb3rd8k8qni0v4ps08psympffyldmmnrqayyad0sn";
type = "gem";
};
version = "0.0.3.3";
};
rubyntlm = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "18d1lxhx62swggf4cqg76h7hp04f5801c8h07w08cm9xng2niqby";
type = "gem";
};
version = "0.3.4";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-math";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-math";
rev = "90a56a5b463546cba5017cf25168bae759bcbf77";
sha256 = "sha256-q8cNRIHYEkaE6QkdsHu4tPwSw3LnCNgKjbyESBXheE0=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-math";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Official MathJax support for Discourse";
};
}

View File

@@ -0,0 +1,9 @@
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem 'bcrypt', '3.1.13'
gem 'unix-crypt', '1.3.0'
gem 'ffi-compiler', '1.0.1', require: false
gem 'argon2', '2.2.0'

View File

@@ -0,0 +1,25 @@
GEM
remote: https://rubygems.org/
specs:
argon2 (2.2.0)
ffi (~> 1.15)
ffi-compiler (~> 1.0)
bcrypt (3.1.13)
ffi (1.17.0)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
rake
rake (13.2.1)
unix-crypt (1.3.0)
PLATFORMS
ruby
DEPENDENCIES
argon2 (= 2.2.0)
bcrypt (= 3.1.13)
ffi-compiler (= 1.0.1)
unix-crypt (= 1.3.0)
BUNDLED WITH
2.5.11

View File

@@ -0,0 +1,22 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-migratepassword";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "communiteq";
repo = "discourse-migratepassword";
rev = "a732ae244cd4125561fd225a67bae95ef5f738d0";
sha256 = "sha256-EO+QnFTy3PgxZ92DZBm9sP8sFAny3ZpFw+faTX32j7Q=";
};
meta = with lib; {
homepage = "https://github.com/communiteq/discourse-migratepassword";
maintainers = with maintainers; [ ryantm ];
license = licenses.gpl2Only;
description = "Support migrated password hashes";
};
}

View File

@@ -0,0 +1,70 @@
{
argon2 = {
dependencies = [
"ffi"
"ffi-compiler"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1wdllcqlr81nzyf485ldv1p660xsi476p79ghbj7zsf3n9n86gwd";
type = "gem";
};
version = "2.2.0";
};
bcrypt = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0ai0m15jg3n0b22mimk09ppnga316dc7dyvz06w8rrqh5gy1lslp";
type = "gem";
};
version = "3.1.13";
};
ffi = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "07139870npj59jnl8vmk39ja3gdk3fb5z9vc0lf32y2h891hwqsi";
type = "gem";
};
version = "1.17.0";
};
ffi-compiler = {
dependencies = [
"ffi"
"rake"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0c2caqm9wqnbidcb8dj4wd3s902z15qmgxplwyfyqbwa0ydki7q1";
type = "gem";
};
version = "1.0.1";
};
rake = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "17850wcwkgi30p7yqh60960ypn7yibacjjha0av78zaxwvd3ijs6";
type = "gem";
};
version = "13.2.1";
};
unix-crypt = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1wflipsmmicmgvqilp9pml4x19b337kh6p6jgrzqrzpkq2z52gdq";
type = "gem";
};
version = "1.3.0";
};
}

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
source 'https://rubygems.org'
group :development do
gem 'rubocop-discourse'
end

View File

@@ -0,0 +1,37 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.2)
parallel (1.22.1)
parser (3.1.1.0)
ast (~> 2.4.1)
rainbow (3.1.1)
regexp_parser (2.2.1)
rexml (3.2.5)
rubocop (1.26.1)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.16.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.16.0)
parser (>= 3.1.1.0)
rubocop-discourse (2.5.0)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.9.0)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
unicode-display_width (2.1.0)
PLATFORMS
ruby
DEPENDENCIES
rubocop-discourse
BUNDLED WITH
2.1.4

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin rec {
name = "discourse-oauth2-basic";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "discourse";
repo = name;
rev = "06ba5daa9aabd0487f2f30b944b6500f1f481308";
sha256 = "sha256-T08Q36k2hb9wVimKIa4O5mWcrr6VBTfHvhRJiLBiRPY=";
};
meta = with lib; {
homepage = "https://github.com/discourse/${name}";
license = licenses.mit;
description = "Basic OAuth2 plugin for use with Discourse";
};
}

View File

@@ -0,0 +1,172 @@
{
ast = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "04nc8x27hlzlrr5c2gn7mar4vdr0apw5xg22wp6m8dx3wqr04a0y";
type = "gem";
};
version = "2.4.2";
};
parallel = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "07vnk6bb54k4yc06xnwck7php50l09vvlw1ga8wdz0pia461zpzb";
type = "gem";
};
version = "1.22.1";
};
parser = {
dependencies = [ "ast" ];
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0zaghgvva2q4jqbachg8jvpwgbg3w1jqr0d00m8rqciqznjgsw3c";
type = "gem";
};
version = "3.1.1.0";
};
rainbow = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0smwg4mii0fm38pyb5fddbmrdpifwv22zv3d3px2xx497am93503";
type = "gem";
};
version = "3.1.1";
};
regexp_parser = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "155f6cr4rrfw5bs5xd3m5kfw32qhc5fsi4nk82rhif56rc6cs0wm";
type = "gem";
};
version = "2.2.1";
};
rexml = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53";
type = "gem";
};
version = "3.2.5";
};
rubocop = {
dependencies = [
"parallel"
"parser"
"rainbow"
"regexp_parser"
"rexml"
"rubocop-ast"
"ruby-progressbar"
"unicode-display_width"
];
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "06105yrqajpm5l07fng1nbk55y9490hny542zclnan8hg841pjgl";
type = "gem";
};
version = "1.26.1";
};
rubocop-ast = {
dependencies = [ "parser" ];
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1bd2z82ly7fix8415gvfiwzb6bjialz5rs3sr72kv1lk68rd23wv";
type = "gem";
};
version = "1.16.0";
};
rubocop-discourse = {
dependencies = [
"rubocop"
"rubocop-rspec"
];
groups = [ "development" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "01f4y7am9cq276zl8vsgv64w8wfmhpbzg7vzsifhgnnh92g6s04g";
type = "gem";
};
version = "2.5.0";
};
rubocop-rspec = {
dependencies = [ "rubocop" ];
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "051gq9pz49iv4gq34d3n089iaa6cb418n2fhin6gd6fpysbi3nf6";
type = "gem";
};
version = "2.9.0";
};
ruby-progressbar = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "02nmaw7yx9kl7rbaan5pl8x5nn0y4j5954mzrkzi9i3dhsrps4nc";
type = "gem";
};
version = "1.11.0";
};
unicode-display_width = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0csjm9shhfik0ci9mgimb7hf3xgh7nx45rkd9rzgdz6vkwr8rzxn";
type = "gem";
};
version = "2.1.0";
};
}

View File

@@ -0,0 +1,7 @@
# frozen_string_literal: true
source 'https://rubygems.org'
group :development do
gem 'rubocop-discourse'
end

View File

@@ -0,0 +1,37 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.1)
parallel (1.19.2)
parser (2.7.2.0)
ast (~> 2.4.1)
rainbow (3.0.0)
regexp_parser (1.8.1)
rexml (3.2.5)
rubocop (0.93.0)
parallel (~> 1.10)
parser (>= 2.7.1.5)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8)
rexml
rubocop-ast (>= 0.6.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.7.1)
parser (>= 2.7.1.5)
rubocop-discourse (2.3.2)
rubocop (>= 0.69.0)
rubocop-rspec (>= 1.39.0)
rubocop-rspec (1.43.2)
rubocop (~> 0.87)
ruby-progressbar (1.10.1)
unicode-display_width (1.7.0)
PLATFORMS
ruby
DEPENDENCIES
rubocop-discourse
BUNDLED WITH
2.1.4

View File

@@ -0,0 +1,22 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-openid-connect";
bundlerEnvArgs.gemdir = ./.;
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-openid-connect";
rev = "e08efecc012a5ab8fa95084be93d4fd07ccebab9";
sha256 = "sha256-v4UWFDdOFON+nHkH490kBQ4sXX7Mrp7KVhN1x9HML7w=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-openid-connect";
maintainers = with maintainers; [ mkg20001 ];
license = licenses.mit;
description = "Discourse plugin to integrate Discourse with an openid-connect login provider";
};
}

View File

@@ -0,0 +1,172 @@
{
ast = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1l3468czzjmxl93ap40hp7z94yxp4nbag0bxqs789bm30md90m2a";
type = "gem";
};
version = "2.4.1";
};
parallel = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "17b127xxmm2yqdz146qwbs57046kn0js1h8synv01dwqz2z1kp2l";
type = "gem";
};
version = "1.19.2";
};
parser = {
dependencies = [ "ast" ];
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1f7gmm60yla325wlnd3qkxs59qm2y0aan8ljpg6k18rwzrrfil6z";
type = "gem";
};
version = "2.7.2.0";
};
rainbow = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk";
type = "gem";
};
version = "3.0.0";
};
regexp_parser = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0n9d14ppshnx71i3mi1pnm3hwhcbb6m6vsc0b0dqgsab8r2rs96n";
type = "gem";
};
version = "1.8.1";
};
rexml = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53";
type = "gem";
};
version = "3.2.5";
};
rubocop = {
dependencies = [
"parallel"
"parser"
"rainbow"
"regexp_parser"
"rexml"
"rubocop-ast"
"ruby-progressbar"
"unicode-display_width"
];
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1nrv7i81549addig09grw17qkab3l4319dcsf9y7psl7aa76ng3a";
type = "gem";
};
version = "0.93.0";
};
rubocop-ast = {
dependencies = [ "parser" ];
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "129hgz4swc8n0g01715v7y00k0h4mlzkxh63q7z27q7mjp54rl74";
type = "gem";
};
version = "0.7.1";
};
rubocop-discourse = {
dependencies = [
"rubocop"
"rubocop-rspec"
];
groups = [ "development" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "10l2wwnvd4xccgqsyhxrhc5bw10b7an4awl0v90fw5xf2qdjiflw";
type = "gem";
};
version = "2.3.2";
};
rubocop-rspec = {
dependencies = [ "rubocop" ];
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1sc0bwdxzfr8byxzwvfyf22lwzqcaa6ca7wzxx31mk7vvy7r7dhl";
type = "gem";
};
version = "1.43.2";
};
ruby-progressbar = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1k77i0d4wsn23ggdd2msrcwfy0i376cglfqypkk2q77r2l3408zf";
type = "gem";
};
version = "1.10.1";
};
unicode-display_width = {
groups = [
"default"
"development"
];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "06i3id27s60141x6fdnjn5rar1cywdwy64ilc59cz937303q3mna";
type = "gem";
};
version = "1.7.0";
};
}

View File

@@ -0,0 +1,6 @@
# frozen_string_literal: true
source "https://rubygems.org"
# gem "rails"
gem "prometheus_exporter", "2.2.0"

View File

@@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
prometheus_exporter (2.2.0)
webrick
webrick (1.9.1)
PLATFORMS
ruby
DEPENDENCIES
prometheus_exporter (= 2.2.0)
BUNDLED WITH
2.5.22

View File

@@ -0,0 +1,30 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
bundlerEnvArgs.gemdir = ./.;
name = "discourse-prometheus";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-prometheus";
rev = "f46906e1d555f6838d74ea38d5037264cc1020b0";
sha256 = "sha256-czrxhH0L+vCZA8DKN6acW///iWJs9GIppEeaP2MOJBQ=";
};
patches = [
# The metrics collector tries to run git to get the commit id but fails
# because we don't run Discourse from a Git repository.
./no-git-version.patch
./spec-import-fix-abi-version.patch
];
meta = with lib; {
homepage = "https://github.com/discourse/discourse-prometheus";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "Official Discourse Plugin for Prometheus Monitoring";
};
}

View File

@@ -0,0 +1,23 @@
{
prometheus_exporter = {
dependencies = [ "webrick" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "15vl8fw8vjnaj9g129dzrwk9nlrdqgffaj3rys4ba9ns2bqim9rq";
type = "gem";
};
version = "2.2.0";
};
webrick = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "12d9n8hll67j737ym2zw4v23cn4vxyfkb6vyv1rzpwv6y6a3qbdl";
type = "gem";
};
version = "1.9.1";
};
}

View File

@@ -0,0 +1,34 @@
diff --git a/lib/internal_metric/global.rb b/lib/internal_metric/global.rb
index 682571b..7bdd431 100644
--- a/lib/internal_metric/global.rb
+++ b/lib/internal_metric/global.rb
@@ -30,28 +30,7 @@ module DiscoursePrometheus::InternalMetric
@active_app_reqs = 0
@queued_app_reqs = 0
@fault_logged = {}
-
- begin
- @@version = nil
-
- out, error, status = Open3.capture3("git rev-parse HEAD")
-
- if status.success?
- @@version ||= out.chomp
- else
- raise error
- end
- rescue => e
- if defined?(::Discourse)
- Discourse.warn_exception(e, message: "Failed to calculate discourse_version_info metric")
- else
- STDERR.puts "Failed to calculate discourse_version_info metric: #{e}\n#{e.backtrace.join("\n")}"
- end
-
- @@retries ||= 10
- @@retries -= 1
- @@version = -1 if @@retries < 0
- end
+ @@version = -1
end
def collect

View File

@@ -0,0 +1,16 @@
diff --git a/bin/collector b/bin/collector
index 4bdce08178..5edc0a4aee 100755
--- a/bin/collector
+++ b/bin/collector
@@ -3,9 +3,11 @@
Process.setproctitle("discourse prometheus-collector")
+# We need the ABI version {MAJOR}.{MINOR}.0 here.
+abi_version = ENV['GEM_PATH'].split("/")[-1]
spec_file =
File.expand_path(
- "../../gems/#{RUBY_VERSION}/specifications/#{"prometheus_exporter-#{ENV["PROMETHEUS_EXPORTER_VERSION"]}"}.gemspec",
+ "../../gems/#{abi_version}/specifications/#{"prometheus_exporter-#{ENV["PROMETHEUS_EXPORTER_VERSION"]}"}.gemspec",
__FILE__,
)

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-reactions";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-reactions";
rev = "f87583d9054421869ba0de16c24ad15e32bbebe7";
sha256 = "sha256-v2AkpSTF3VNgBUfvRMQ3BCw0nClWjcVTdKNn9yiByBM=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-reactions";
maintainers = with maintainers; [ bbenno ];
license = licenses.mit;
description = "Allows users to react to a post from a choice of emojis, rather than only the like heart";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-saved-searches";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-saved-searches";
rev = "b78aae086e95255b1a1e91a01e2d56b45b7aead2";
sha256 = "sha256-Wai+oZR+Pzjre6Th0kQDgvFOwfPRHlZkpKYYOUKNlx4=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-saved-searches";
maintainers = with maintainers; [ dpausp ];
license = licenses.mit;
description = "Allow users to save searches and be notified of new results";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-solved";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-solved";
rev = "e82c6ae1ca38ccebb34669148f8de93a3028906e";
sha256 = "sha256-KwpBCk4fjkZlSzgtc0OXvQupPd+aPb9nONyyALpEZhg=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-solved";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Allow accepted answers on topics";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-spoiler-alert";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-spoiler-alert";
rev = "42b77ec048b9b386a8b25a22bfec6472817da465";
sha256 = "sha256-BQeID+y9RvmcnuNsodOMXseVvre5QYxv+E/ul8bucUI=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-spoiler-alert";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Hide spoilers behind the spoiler-alert jQuery plugin";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-voting";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-topic-voting";
rev = "d779202749e56aaee2d548b538796fb5db1b9b7c";
sha256 = "sha256-8YF7W5SXhI7TGJNZkx5or7bxI0MKiDtx10TE2ekBMuM=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-voting";
maintainers = with maintainers; [ dpausp ];
license = licenses.gpl2Only;
description = "Adds the ability for voting on a topic within a specified category in Discourse";
};
}

View File

@@ -0,0 +1,21 @@
{
lib,
mkDiscoursePlugin,
fetchFromGitHub,
}:
mkDiscoursePlugin {
name = "discourse-yearly-review";
src = fetchFromGitHub {
owner = "discourse";
repo = "discourse-yearly-review";
rev = "439e0d78f1d8a0f387c0ec26f233a090ce82ef72";
sha256 = "sha256-DXA5P7XnItBjP4H1J/G1cGbFddSDZh0wjMZiJ5JA9s8=";
};
meta = with lib; {
homepage = "https://github.com/discourse/discourse-yearly-review";
maintainers = with maintainers; [ talyz ];
license = licenses.mit;
description = "Publishes an automated Year in Review topic";
};
}