mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 16:15:05 +00:00
f34e8105cb
matrix-appservice-irc: apply requests from review
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ pkgs, nodePackages, makeWrapper, nixosTests, nodejs, stdenv, lib, fetchFromGitHub }:
|
|
|
|
let
|
|
ourNodePackages = import ./node-composition.nix {
|
|
inherit pkgs nodejs;
|
|
inherit (stdenv.hostPlatform) system;
|
|
};
|
|
version = builtins.replaceStrings [ "\n" ] [ "" ] (builtins.readFile ./REVISION);
|
|
in
|
|
ourNodePackages.package.override {
|
|
pname = "matrix-appservice-irc";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "matrix-org";
|
|
repo = "matrix-appservice-irc";
|
|
rev = version;
|
|
sha256 = "sha256-EncodJKptrLC54B5XipkiHXFgJ5cD+crcT3SOPOc+7M=";
|
|
};
|
|
|
|
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;
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
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;
|
|
};
|
|
}
|