git.iko.soy/typeable/nixpkgs
on master help sign in
solanum: fix MOTD

Previously this defaulted to the default MOTD in the solanum source tree, and I don't want my friends to laugh at me. Includes a patch to the tests to ensure that the MOTD is actually set. This replicates the fix done in #109705 (solanum is a fork of charybdis, so they share fundamental logic for this). Signed-off-by: Christine Dodrill <me@christine.website>

commitb1fe9fab6fcfa4cdefe7370ba264b281e48de0f8 authorChristine Dodrill <me@christine.website> dateSun 30 May 2021, 20:27 (5 years ago) parent2e25af3
2 files changed+12
nixos/tests/solanum.nix+8 pkgs/servers/irc/solanum/default.nix+4
nixos/tests/solanum.nix+8
@@ -16,6 +16,10 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
1616 networking.firewall.allowedTCPPorts = [ ircPort ];
1717 services.solanum = {
1818 enable = true;
19+ motd = ''
20+ The default MOTD doesn't contain the word "nixos" in it.
21+ This one does.
22+ '';
1923 };
2024 };
2125 } // lib.listToAttrs (builtins.map (client: lib.nameValuePair client {
@@ -48,6 +52,10 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
4852 ${client}.wait_for_unit("ii")
4953 ${client}.wait_for_file("${iiDir}/${server}/out")
5054 ''
55+ # look for the custom text in the MOTD.
56+ ''
57+ ${client}.wait_until_succeeds("grep 'nixos' ${iiDir}/${server}/out")
58+ ''
5159 # wait until first PING from server arrives before joining,
5260 # so we don't try it too early
5361 ''
pkgs/servers/irc/solanum/default.nix+4
@@ -25,6 +25,10 @@ stdenv.mkDerivation rec {
2525 ./dont-create-logdir.patch
2626 ];
2727
28+ postPatch = ''
29+ substituteInPlace include/defaults.h --replace 'ETCPATH "' '"/etc/solanum'
30+ '';
31+
2832 configureFlags = [
2933 "--enable-epoll"
3034 "--enable-ipv6"