~aasg/nixexprs

ref: 4b5399b1f065b1ba2703e84ac96827ab9b47c5e7 nixexprs/pkgs/servers/matrix-synapse/matrix-appservice-irc/default.nix -rw-r--r-- 797 bytes
4b5399b1 — Aluísio Augusto Silva Gonçalves ci: Don't rely on `meta.platforms` being set 4 months ago
                                                                                
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
{ stdenv, lib, pkgs, makeWrapper, nodejs, xcodebuild }:
let
  nodePackages = import ./node-composition.nix {
    inherit pkgs nodejs;
    inherit (stdenv.hostPlatform) system;
  };
in
nodePackages.matrix-appservice-irc.override {
  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [ nodePackages.node-gyp-build ]
    ++ lib.optional stdenv.isDarwin xcodebuild;

  postInstall = ''
    makeWrapper '${nodejs}/bin/node' "$out/bin/matrix-appservice-irc" \
      --add-flags "$out/lib/node_modules/matrix-appservice-irc/app.js"
  '';

  meta = with lib; {
    description = "Node.js IRC bridge for Matrix";
    homepage = "https://github.com/matrix-org/matrix-appservice-irc";
    license = licenses.asl20;
    maintainers = with maintainers; [ AluisioASG ];
    platforms = platforms.all;
  };
}