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

26 lines
737 B
Nix
Raw Normal View History

2019-10-08 14:26:19 +01:00
{ pkgs, nodejs, stdenv, lib, ... }:
2019-10-06 19:57:15 +01:00
let
2019-10-08 14:26:19 +01:00
packageName = with lib; concatStrings (map (entry: (concatStrings (mapAttrsToList (key: value: "${key}-${value}") entry))) (importJSON ./package.json));
2019-10-06 19:57:15 +01:00
nodePackages = import ./node-composition.nix {
inherit pkgs nodejs;
inherit (stdenv.hostPlatform) system;
};
2019-10-08 14:26:19 +01:00
in
nodePackages."${packageName}".override {
2019-10-06 19:57:15 +01:00
nativeBuildInputs = [ pkgs.makeWrapper ];
postInstall = ''
2019-10-08 14:26:19 +01: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 19:57:15 +01:00
'';
meta = with lib; {
description = "A Matrix <--> Slack bridge";
maintainers = with maintainers; [ kampka ];
2019-10-08 14:26:19 +01:00
license = licenses.asl20;
2019-10-06 19:57:15 +01:00
};
}