mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, fetchYarnDeps
|
|
, makeWrapper
|
|
, matrix-sdk-crypto-nodejs
|
|
, mkYarnPackage
|
|
, nodejs
|
|
}:
|
|
|
|
let
|
|
data = lib.importJSON ./pin.json;
|
|
in
|
|
mkYarnPackage rec {
|
|
inherit nodejs;
|
|
|
|
pname = "matrix-appservice-slack";
|
|
version = data.version;
|
|
|
|
packageJSON = ./package.json;
|
|
src = fetchFromGitHub {
|
|
owner = "matrix-org";
|
|
repo = "matrix-appservice-slack";
|
|
rev = data.version;
|
|
hash = data.srcHash;
|
|
};
|
|
|
|
offlineCache = fetchYarnDeps {
|
|
yarnLock = src + "/yarn.lock";
|
|
sha256 = data.yarnHash;
|
|
};
|
|
packageResolutions = {
|
|
"@matrix-org/matrix-sdk-crypto-nodejs" = "${matrix-sdk-crypto-nodejs}/lib/node_modules/@matrix-org/matrix-sdk-crypto-nodejs";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
yarn run build
|
|
runHook postBuild
|
|
'';
|
|
|
|
postInstall = ''
|
|
makeWrapper '${nodejs}/bin/node' "$out/bin/matrix-appservice-slack" --add-flags \
|
|
"$out/libexec/matrix-appservice-slack/deps/matrix-appservice-slack/lib/app.js"
|
|
'';
|
|
|
|
doDist = false;
|
|
|
|
meta = with lib; {
|
|
description = "A Matrix <--> Slack bridge";
|
|
mainProgram = "matrix-appservice-slack";
|
|
maintainers = with maintainers; [ beardhatcode chvp ];
|
|
license = licenses.asl20;
|
|
};
|
|
}
|