summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParthiv Seetharaman <pachum99@myrdd.info>2022-04-23 23:31:09 -0700
committerParthiv Seetharaman <pachum99@myrdd.info>2022-04-23 23:31:09 -0700
commitff782189f05f48f28a8292b0e3c9bb579ebe93e5 (patch)
tree2e0b5230216b9f6cb16a0a9e46487ac0c0f6a9ef
parent87cd2673fbfee105d2ff7e07634645ef86ae6557 (diff)
pkgs: add mautrix-discord from beeper
-rw-r--r--examples/mautrix.nix6
-rw-r--r--pkgs/default.nix1
-rw-r--r--pkgs/mautrix-discord/default.nix29
3 files changed, 36 insertions, 0 deletions
diff --git a/examples/mautrix.nix b/examples/mautrix.nix
index 7de04ee..c5f0b34 100644
--- a/examples/mautrix.nix
+++ b/examples/mautrix.nix
@@ -15,6 +15,12 @@
package = pkgs.mautrix-whatsapp;
};
+ discord = {
+ port = 29188;
+ format = "mautrix-go";
+ package = pkgs.mautrix-discord;
+ };
+
signal = {
port = 29184;
format = "mautrix-python";
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 2924023..50f5bc9 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -2,6 +2,7 @@
mx-puppet-groupme = pkgs.callPackage ./mx-puppet-groupme { };
mx-puppet-slack = pkgs.callPackage ./mx-puppet-slack { };
+ mautrix-discord = pkgs.callPackage ./mautrix-discord { };
mautrix-twitter = pkgs.callPackage ./mautrix-twitter { };
mautrix-instagram = pkgs.callPackage ./mautrix-instagram { };
mautrix-wsproxy = pkgs.callPackage ./mautrix-wsproxy { };
diff --git a/pkgs/mautrix-discord/default.nix b/pkgs/mautrix-discord/default.nix
new file mode 100644
index 0000000..33856ac
--- /dev/null
+++ b/pkgs/mautrix-discord/default.nix
@@ -0,0 +1,29 @@
+{ lib, buildGoModule, fetchFromGitLab, olm }:
+
+buildGoModule rec {
+ pname = "mautrix-discord";
+ version = "unstable-2022-04-22";
+
+ src = fetchFromGitLab {
+ owner = "beeper";
+ repo = "discord";
+ rev = "145c0cc2cbcfeabd13dfbfb8f9b844d2d37a6dcc";
+ sha256 = "sha256-FvPYUj6x47JSgBSVvKRrsbOA1WjnEgvYbj+bxpXMyuc=";
+ };
+
+ buildInputs = [ olm ];
+
+ vendorSha256 = "sha256-WJJHAppvoeG4t7cY6fbuT8HKjYwEmg9PSAqyMcsiKh0=";
+
+ doCheck = false;
+
+ runVend = true;
+
+ meta = with lib; {
+ mainProgram = "discord";
+ homepage = "https://gitlab.com/beeper/discord";
+ description = "Matrix <-> Discord hybrid puppeting/relaybot bridge";
+ license = licenses.agpl3;
+ maintainers = with maintainers; [ pacman99 ];
+ };
+}