summaryrefslogtreecommitdiff
path: root/pkgs/mautrix-wsproxy/default.nix
blob: 8a3d0b4c59c380c4b3dd1776126be144e68dd823 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, buildGoModule, fetchFromGitHub, olm }:

buildGoModule rec {
  pname = "mautrix-wsproxy-bin";
  version = "unstable-2021-09-07";

  src = fetchFromGitHub {
    owner = "mautrix";
    repo = "wsproxy";
    rev = "2f097e3f2b6d003b3c913933839f12a8cd9d2d41";
    sha256 = "0sy7ns60nzq58j500cswvj04q75ji18cnn01bacdrqwnklmh2g24";
  };

  buildInputs = [ olm ];

  vendorSha256 = "sha256-Gcm16SbmcnZc76TKyRV6wokznRiBb525WGFUYcor8SE=";

  doCheck = false;

  proxyVendor = true;

  postInstall = ''
    mv $out/bin/mautrix-wsproxy $out/bin/mautrix-wsproxy-bin

  '';

  meta = with lib; {
    homepage = "https://github.com/mautrix/wsproxy";
    description = "A simple HTTP push -> websocket proxy for Matrix appservices.";
    mainProgram = "mautrix-wsproxy-bin";
    license = licenses.agpl3Plus;
    maintainers = with maintainers; [ pacman99 ];
  };
}