My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix

30 lines
986 B

{ 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 {
pname = "matrix-appservice-irc";
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;
};
}