diff --git a/pkgs/default.nix b/pkgs/default.nix index 33d5d3a..156e247 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -31,7 +31,6 @@ in fetchSubmodules = true; }; }); - maubot = callPackage ./maubot.nix { }; pineapplebot = callPackage ./pineapplebot.nix { }; proton-ge = pkgs.stdenvNoCC.mkDerivation { inherit (sources.proton-ge) pname version src; diff --git a/pkgs/maubot.nix b/pkgs/maubot.nix deleted file mode 100644 index 9d6aae2..0000000 --- a/pkgs/maubot.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ lib -, fetchpatch -, python3 -, runCommand -, encryptionSupport ? true -}: - -let - python = python3.override { - packageOverrides = self: super: { - aiosqlite = super.aiosqlite.overrideAttrs (old: rec { - version = "0.18.0"; - src = old.src.override { - rev = "refs/tags/v${version}"; - hash = "sha256-yPGSKqjOz1EY5/V0oKz2EiZ90q2O4TINoXdxHuB7Gqk="; - }; - }); - sqlalchemy = super.buildPythonPackage rec { - pname = "SQLAlchemy"; - version = "1.3.24"; - - src = super.fetchPypi { - inherit pname version; - sha256 = "sha256-67t3fL+TEjWbiXv4G6ANrg9ctp+6KhgmXcwYpvXvdRk="; - }; - - postInstall = '' - sed -e 's:--max-worker-restart=5::g' -i setup.cfg - ''; - - doCheck = false; - }; - }; - }; - - self = with python.pkgs; buildPythonPackage rec { - pname = "maubot"; - version = "0.4.1"; - disabled = pythonOlder "3.8"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-Ro2PPgF8818F8JewPZ3AlbfWFNNHKTZkQq+1zpm3kk4="; - }; - - patches = [ - # add entry point - (fetchpatch { - url = "https://patch-diff.githubusercontent.com/raw/maubot/maubot/pull/146.patch"; - sha256 = "0yn5357z346qzy5v5g124mgiah1xsi9yyfq42zg028c8paiw8s8x"; - }) - ]; - - propagatedBuildInputs = [ - # requirements.txt - mautrix - aiohttp - yarl - sqlalchemy - asyncpg - aiosqlite - CommonMark - ruamel-yaml - attrs - bcrypt - packaging - click - colorama - questionary - jinja2 - ] - # optional-requirements.txt - ++ lib.optionals encryptionSupport [ - python-olm - pycryptodome - unpaddedbase64 - ]; - - passthru.tests = { - simple = runCommand "${pname}-tests" { } '' - ${self}/bin/mbc --help > $out - ''; - }; - - # Setuptools is trying to do python -m maubot test - dontUseSetuptoolsCheck = true; - - pythonImportsCheck = [ - "maubot" - ]; - - meta = with lib; { - description = "A plugin-based Matrix bot system written in Python"; - homepage = "https://github.com/maubot/maubot"; - changelog = "https://github.com/maubot/maubot/blob/v${version}/CHANGELOG.md"; - license = licenses.agpl3Plus; - maintainers = with maintainers; [ chayleaf ]; - }; - }; - -in -self diff --git a/system/hosts/nixserver/maubot.nix b/system/hosts/nixserver/maubot.nix index 700c982..c3707c5 100644 --- a/system/hosts/nixserver/maubot.nix +++ b/system/hosts/nixserver/maubot.nix @@ -49,6 +49,7 @@ in { }; services.maubot.enable = true; services.maubot.settings = { + database = "postgresql://maubot@localhost/maubot"; server.public_url = "https://matrix.${cfg.domainName}"; }; services.maubot.plugins = with config.services.maubot.package.plugins; [