29 lines
950 B
Nix
29 lines
950 B
Nix
{ pkgs, nodePackages, makeWrapper, nixosTests, nodejs, stdenv, lib, ... }:
|
|
|
|
let
|
|
|
|
packageName = with lib; concatStrings (map (entry: (concatStrings (mapAttrsToList (key: value: "${key}-${value}") entry))) (importJSON ./package.json));
|
|
|
|
ourNodePackages = import ./node-composition.nix {
|
|
inherit pkgs nodejs;
|
|
inherit (stdenv.hostPlatform) system;
|
|
};
|
|
in
|
|
ourNodePackages."${packageName}".override {
|
|
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"
|
|
'';
|
|
|
|
passthru.tests.matrix-appservice-irc = nixosTests.matrix-appservice-irc;
|
|
|
|
meta = with lib; {
|
|
description = "Node.js IRC bridge for Matrix";
|
|
maintainers = with maintainers; [ piegames ];
|
|
homepage = "https://github.com/matrix-org/matrix-appservice-irc";
|
|
license = licenses.asl20;
|
|
};
|
|
}
|