summary refs log tree commit diff
path: root/default.nix
blob: 2bd029254942b73ec86525a156067cb9014026d2 (plain) (blame)
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
35
36
37
38
39
40
41
42
{
  lib,
  fetchgit,
  makeWrapper,
  nodejs,
  buildNpmPackage,
}:
buildNpmPackage {
  pname = "out-of-your-element";
  version = "0";
  src = fetchgit {
    url = "https://gitdab.com/cadence/out-of-your-element.git";
    rev = "7d83f114bae92d4a992fdb0c5a44936c4e47994e";
    sha256 = "sha256-IoO9dkxdDZlKSCllimwhn5YuvOzX8tSwAf5Qhckqkk4=";
  };
  npmDepsHash = "sha256-UqD1wj19Z23ZtW/J0uJ4Ft+gc9XWrbCz9tL2KkD03ZY=";
  dontNpmBuild = true;

  nativeBuildInputs = [ makeWrapper ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share
    cp -a . $out/share/ooye
    makeWrapper ${nodejs}/bin/node $out/bin/matrix-ooye --add-flags $out/share/ooye/start.js
    makeWrapper ${nodejs}/bin/node $out/bin/matrix-ooye-addbot --add-flags $out/share/ooye/addbot.js

    runHook postInstall
  '';

  meta = with lib; {
    description = "Matrix-Discord bridge with modern features.";
    homepage = "https://gitdab.com/cadence/out-of-your-element";
    longDescription = ''
      Modern Matrix-to-Discord appservice bridge, created by @cadence:cadence.moe.
    '';
    license = licenses.gpl3;
    # maintainers = with maintainers; [ RorySys ];
    mainProgram = "matrix-ooye";
  };
}