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,49 @@
diff --git a/src/Main.hs b/src/Main.hs
index 61da2f3..39e5c9b 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -73,11 +73,14 @@ main = do
config' <- sequence config
dir <- P.getDataDir
exitWith <=< lambdabotMain modulesInfo $
- [dataDir ==> dir, lbVersion ==> P.version] ++ config'
+ [dataDir ==> dir, lbVersion ==> P.version] ++ configInfo ++ config'
-- special online target for ghci use
online :: [String] -> IO ()
online strs = do
dir <- P.getDataDir
- void $ lambdabotMain modulesInfo
- [dataDir ==> dir, lbVersion ==> P.version, onStartupCmds ==> strs]
+ void $ lambdabotMain modulesInfo $
+ [dataDir ==> dir, lbVersion ==> P.version, onStartupCmds ==> strs] ++ configInfo
+
+configInfo :: [DSum Config Identity]
+configInfo = @config@
diff --git a/src/Modules.hs b/src/Modules.hs
index 036ea1f..eaafa50 100644
--- a/src/Modules.hs
+++ b/src/Modules.hs
@@ -14,10 +14,15 @@ import Lambdabot.Plugin.Reference
import Lambdabot.Plugin.Social
modulesInfo :: Modules
-modulesInfo = $(modules $ corePlugins
- ++ haskellPlugins
- ++ ["irc", "localtime", "topic"] -- ircPlugins
- ++ ["dummy", "fresh", "todo"] -- miscPlugins
- ++ ["bf", "dice", "elite", "filter", "quote", "slap", "unlambda", "vixen"] -- noveltyPlugins
- ++ referencePlugins
- ++ socialPlugins)
+modulesInfo =
+ $(modules $
+ let oldDefaultModules =
+ corePlugins
+ ++ haskellPlugins
+ ++ ["irc", "localtime", "topic"] -- ircPlugins
+ ++ ["dummy", "fresh", "todo"] -- miscPlugins
+ ++ ["bf", "dice", "elite", "filter", "quote", "slap", "unlambda", "vixen"] -- noveltyPlugins
+ ++ referencePlugins
+ ++ socialPlugins
+ in @modules@
+ )

View File

@@ -0,0 +1,49 @@
{
lib,
haskellLib,
makeWrapper,
haskellPackages,
mueval,
withDjinn ? true,
aspell ? null,
packages ? (pkgs: [ ]),
modules ? "oldDefaultModules",
configuration ? "[]",
}:
let
allPkgs = pkgs: mueval.defaultPkgs pkgs ++ [ pkgs.lambdabot-trusted ] ++ packages pkgs;
mueval' = mueval.override {
inherit haskellPackages;
packages = allPkgs;
};
bins = lib.makeBinPath (
[
mueval'
(haskellPackages.ghcWithHoogle allPkgs)
haskellPackages.unlambda
haskellPackages.brainfuck
]
++ lib.optional withDjinn haskellPackages.djinn
++ lib.optional (aspell != null) aspell
);
modulesStr = lib.replaceStrings [ "\n" ] [ " " ] modules;
configStr = lib.replaceStrings [ "\n" ] [ " " ] configuration;
in
haskellLib.overrideCabal (self: {
patches = (self.patches or [ ]) ++ [ ./custom-config.patch ];
postPatch = (self.postPatch or "") + ''
substituteInPlace src/Main.hs \
--replace '@config@' '${configStr}'
substituteInPlace src/Modules.hs \
--replace '@modules@' '${modulesStr}'
'';
buildTools = (self.buildTools or [ ]) ++ [ makeWrapper ];
postInstall = (self.postInstall or "") + ''
wrapProgram $out/bin/lambdabot \
--prefix PATH ":" '${bins}'
'';
}) haskellPackages.lambdabot