1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/servers/matrix-synapse/matrix-appservice-slack/default.nix

25 lines
738 B
Nix
Raw Normal View History

2019-10-06 19:57:15 +01:00
{ pkgs, nodejs, stdenv, lib, ...}:
let
packageName = with lib; concatStrings (map (entry: (concatStrings (mapAttrsToList (key: value: "${key}-${value}") entry))) (importJSON ./package.json)) ;
nodePackages = import ./node-composition.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
in nodePackages."${packageName}".override {
nativeBuildInputs = [ pkgs.makeWrapper ];
postInstall = ''
makeWrapper '${nodejs}/bin/node' "$out/bin/matrix-appservice-slack" \
--add-flags "$out/lib/node_modules/matrix-appservice-slack/lib/app.js"
'';
meta = with lib; {
description = "A Matrix <--> Slack bridge";
maintainers = with maintainers; [ kampka ];
license = licenses.asl20;
};
}