From 67bbe8551c57ffbf688dbdddb73702d2e86fb1a8 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Tue, 13 Jun 2023 23:01:25 +0200 Subject: [PATCH] Add overlay for `mautrix-discord` Signed-off-by: Magic_RB --- flake.nix | 1 + overlays/mautrix-discord.nix | 39 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 overlays/mautrix-discord.nix diff --git a/flake.nix b/flake.nix index e687437..2f21a87 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,7 @@ overlays/emacs-master-nativecomp overlays/zfs-relmount overlays/ical2org.nix + overlays/mautrix-discord.nix ]; flake.nixosModules = { diff --git a/overlays/mautrix-discord.nix b/overlays/mautrix-discord.nix new file mode 100644 index 0000000..297d591 --- /dev/null +++ b/overlays/mautrix-discord.nix @@ -0,0 +1,39 @@ +# SPDX-FileCopyrightText: 2022 Richard Brežák +# +# SPDX-License-Identifier: LGPL-3.0-or-later +{ inputs, ... }: +{ + flake.overlays.mautrix-discord = + final: prev: + let + inherit (prev.lib) + singleton; + in + { + mautrix-discord = + prev.buildGoModule rec { + pname = "mautrix-discord"; + version = "0.3.0"; + + src = prev.fetchFromGitHub { + owner = "mautrix"; + repo = "discord"; + rev = "v${version}"; + hash = "sha256-Qlok8LnnuJYCmkDssyNRfrHSdBNi5J40cXJHX7xa4fI="; + }; + + buildInputs = singleton prev.olm; + + vendorSha256 = "sha256-OqMa4hpJLQRID8QxxX++lyFy/6b3Rg9GeQ7Qe+dsIkY="; + + doCheck = false; + + meta = with prev.lib; { + homepage = "https://github.com/tulir/mautrix-whatsapp"; + description = "Matrix <-> Discord hybrid puppeting/relaybot bridge"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ ]; + }; + }; + }; +}