discourse: fix passthru nixos test

This commit is contained in:
Martin Weinelt 2025-08-04 15:23:50 +02:00
parent 7db4feef65
commit a4cadd9cfa
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
3 changed files with 17 additions and 12 deletions

View File

@ -422,7 +422,14 @@ in
dex-oidc = runTest ./dex-oidc.nix; dex-oidc = runTest ./dex-oidc.nix;
dhparams = runTest ./dhparams.nix; dhparams = runTest ./dhparams.nix;
disable-installer-tools = runTest ./disable-installer-tools.nix; disable-installer-tools = runTest ./disable-installer-tools.nix;
discourse = runTest ./discourse.nix; discourse = runTest {
imports = [ ./discourse.nix ];
_module.args.package = pkgs.discourse;
};
discourseAllPlugins = runTest {
imports = [ ./discourse.nix ];
_module.args.package = pkgs.discourseAllPlugins;
};
dnscrypt-proxy2 = runTestOn [ "x86_64-linux" ] ./dnscrypt-proxy2.nix; dnscrypt-proxy2 = runTestOn [ "x86_64-linux" ] ./dnscrypt-proxy2.nix;
dnsdist = import ./dnsdist.nix { inherit pkgs runTest; }; dnsdist = import ./dnsdist.nix { inherit pkgs runTest; };
doas = runTest ./doas.nix; doas = runTest ./doas.nix;

View File

@ -4,9 +4,9 @@
# 3. replying to that message via email. # 3. replying to that message via email.
{ {
lib,
package, package,
pkgs, pkgs,
lib,
... ...
}: }:
let let
@ -26,8 +26,6 @@ in
name = "discourse"; name = "discourse";
meta.maintainers = with lib.maintainers; [ talyz ]; meta.maintainers = with lib.maintainers; [ talyz ];
_module.args.package = lib.mkDefault pkgs.discourse;
nodes.discourse = nodes.discourse =
{ nodes, ... }: { nodes, ... }:
{ {
@ -62,7 +60,7 @@ in
services.discourse = { services.discourse = {
enable = true; enable = true;
inherit admin; inherit admin package;
hostname = discourseDomain; hostname = discourseDomain;
sslCertificate = "${certs.${discourseDomain}.cert}"; sslCertificate = "${certs.${discourseDomain}.cert}";
sslCertificateKey = "${certs.${discourseDomain}.key}"; sslCertificateKey = "${certs.${discourseDomain}.key}";

View File

@ -8,9 +8,9 @@
fetchFromGitHub, fetchFromGitHub,
bundlerEnv, bundlerEnv,
callPackage, callPackage,
nixosTests,
ruby_3_3, ruby_3_3,
replace,
gzip, gzip,
gnutar, gnutar,
git, git,
@ -43,7 +43,7 @@
uglify-js, uglify-js,
plugins ? [ ], plugins ? [ ],
}@args: }:
let let
version = "3.4.6"; version = "3.4.6";
@ -433,13 +433,13 @@ let
enabledPlugins = plugins; enabledPlugins = plugins;
plugins = callPackage ./plugins/all-plugins.nix { inherit mkDiscoursePlugin; }; plugins = callPackage ./plugins/all-plugins.nix { inherit mkDiscoursePlugin; };
ruby = rubyEnv.wrappedRuby; ruby = rubyEnv.wrappedRuby;
tests = import ../../../../nixos/tests/discourse.nix { tests = {
inherit (stdenv) system; inherit (nixosTests)
inherit pkgs; discourse
package = pkgs.discourse.override args; discourseAllPlugins
;
}; };
}; };
meta = with lib; { meta = with lib; {
homepage = "https://www.discourse.org/"; homepage = "https://www.discourse.org/";
platforms = platforms.linux; platforms = platforms.linux;