2021-09-07 22:47:32 +01:00
|
|
|
{ pkgs, nodePackages, makeWrapper, nixosTests, nodejs, stdenv, lib, fetchFromGitHub }:
|
2020-05-28 13:03:00 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
ourNodePackages = import ./node-composition.nix {
|
|
|
|
inherit pkgs nodejs;
|
|
|
|
inherit (stdenv.hostPlatform) system;
|
|
|
|
};
|
2021-11-07 21:18:22 +00:00
|
|
|
version = (lib.importJSON ./package.json).version;
|
2021-11-30 15:04:59 +00:00
|
|
|
srcInfo = lib.importJSON ./src.json;
|
2020-05-28 13:03:00 +01:00
|
|
|
in
|
2021-09-07 22:47:32 +01:00
|
|
|
ourNodePackages.package.override {
|
2021-05-23 22:45:47 +01:00
|
|
|
pname = "matrix-appservice-irc";
|
2021-09-07 22:47:32 +01:00
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "matrix-org";
|
|
|
|
repo = "matrix-appservice-irc";
|
|
|
|
rev = version;
|
2021-11-30 15:04:59 +00:00
|
|
|
inherit (srcInfo) sha256;
|
2021-09-07 22:47:32 +01:00
|
|
|
};
|
2021-05-23 22:45:47 +01:00
|
|
|
|
2020-05-28 13:03:00 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper nodePackages.node-gyp-build ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
makeWrapper '${nodejs}/bin/node' "$out/bin/matrix-appservice-irc" \
|
|
|
|
--add-flags "$out/lib/node_modules/matrix-appservice-irc/app.js"
|
|
|
|
'';
|
|
|
|
|
2020-08-30 08:42:21 +01:00
|
|
|
passthru.tests.matrix-appservice-irc = nixosTests.matrix-appservice-irc;
|
2021-08-17 21:37:58 +01:00
|
|
|
passthru.updateScript = ./update.sh;
|
2020-08-30 08:42:21 +01:00
|
|
|
|
2020-05-28 13:03:00 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Node.js IRC bridge for Matrix";
|
2021-11-13 21:25:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-05-28 13:03:00 +01:00
|
|
|
homepage = "https://github.com/matrix-org/matrix-appservice-irc";
|
|
|
|
license = licenses.asl20;
|
|
|
|
};
|
|
|
|
}
|