nixpkgs/pkgs/servers/matrix-synapse/matrix-appservice-slack/default.nix

26 lines
730 B
Nix
Raw Normal View History

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