mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
matrix-appservice-irc: 0.34.1 -> 0.35.0
Fetches, injects and patchelfs the rust native crypto bindings for the two most prominent targets.
This commit is contained in:
parent
cb8c505bc3
commit
24d15603ad
4 changed files with 1329 additions and 1600 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, nodePackages, makeWrapper, nixosTests, nodejs, stdenv, lib, fetchFromGitHub }:
|
{ pkgs, nodePackages, makeWrapper, nixosTests, nodejs, stdenv, lib, fetchFromGitHub, fetchurl, autoPatchelfHook }:
|
||||||
|
|
||||||
let
|
let
|
||||||
ourNodePackages = import ./node-composition.nix {
|
ourNodePackages = import ./node-composition.nix {
|
||||||
|
@ -7,6 +7,26 @@ let
|
||||||
};
|
};
|
||||||
version = (lib.importJSON ./package.json).version;
|
version = (lib.importJSON ./package.json).version;
|
||||||
srcInfo = lib.importJSON ./src.json;
|
srcInfo = lib.importJSON ./src.json;
|
||||||
|
|
||||||
|
# TODO: package matrix-rust-sdk and use that instead of fetching & patching binaries
|
||||||
|
platform = {
|
||||||
|
"x86_64-linux" = "linux-x64-gnu";
|
||||||
|
"aarch64-linux" = "linux-arm64-gnu";
|
||||||
|
}.${stdenv.hostPlatform.system} or
|
||||||
|
(throw "matrix-appservice-irc: Unsupported platform ${stdenv.hostPlatform.system}");
|
||||||
|
|
||||||
|
matrix-sdk-crypto = let
|
||||||
|
version = "0.1.0-beta.1";
|
||||||
|
base = "https://github.com/matrix-org/matrix-rust-sdk/releases/download/matrix-sdk-crypto-nodejs-v${version}";
|
||||||
|
in
|
||||||
|
fetchurl {
|
||||||
|
url = "${base}/matrix-sdk-crypto.${platform}.node";
|
||||||
|
hash = {
|
||||||
|
"x86_64-linux" = "sha256-a6FX+KhHooipIMsJ7Fl7gmUBt8WbTUgT6sXN4N3NXRk=";
|
||||||
|
"aarch64-linux" = "sha256-jvr6gMTQ4aAk5x0iXpA28ADdaCgDpvOjmogd52Z6bIY=";
|
||||||
|
}.${stdenv.hostPlatform.system} or
|
||||||
|
(throw "matrix-appservice-irc: Unsupported platform ${stdenv.hostPlatform.system}");
|
||||||
|
};
|
||||||
in
|
in
|
||||||
ourNodePackages.package.override {
|
ourNodePackages.package.override {
|
||||||
pname = "matrix-appservice-irc";
|
pname = "matrix-appservice-irc";
|
||||||
|
@ -19,11 +39,18 @@ ourNodePackages.package.override {
|
||||||
inherit (srcInfo) sha256;
|
inherit (srcInfo) sha256;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper nodePackages.node-gyp-build ];
|
nativeBuildInputs = [ autoPatchelfHook makeWrapper nodePackages.node-gyp-build ];
|
||||||
|
|
||||||
|
dontAutoPatchelf = true;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
makeWrapper '${nodejs}/bin/node' "$out/bin/matrix-appservice-irc" \
|
makeWrapper '${nodejs}/bin/node' "$out/bin/matrix-appservice-irc" \
|
||||||
--add-flags "$out/lib/node_modules/matrix-appservice-irc/app.js"
|
--add-flags "$out/lib/node_modules/matrix-appservice-irc/app.js"
|
||||||
|
|
||||||
|
# install the native bindings for matrix-sdk-crypto
|
||||||
|
export CRYPTO_SDK_PATH="$out/lib/node_modules/matrix-appservice-irc/node_modules/@matrix-org/matrix-sdk-crypto-nodejs/matrix-sdk-crypto.${platform}.node"
|
||||||
|
cp -v ${matrix-sdk-crypto} "$CRYPTO_SDK_PATH"
|
||||||
|
autoPatchelf "$CRYPTO_SDK_PATH"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.tests.matrix-appservice-irc = nixosTests.matrix-appservice-irc;
|
passthru.tests.matrix-appservice-irc = nixosTests.matrix-appservice-irc;
|
||||||
|
@ -34,5 +61,6 @@ ourNodePackages.package.override {
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ ];
|
||||||
homepage = "https://github.com/matrix-org/matrix-appservice-irc";
|
homepage = "https://github.com/matrix-org/matrix-appservice-irc";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "matrix-appservice-irc",
|
"name": "matrix-appservice-irc",
|
||||||
"version": "0.34.0",
|
"version": "0.35.0",
|
||||||
"description": "An IRC Bridge for Matrix",
|
"description": "An IRC Bridge for Matrix",
|
||||||
"main": "app.js",
|
"main": "app.js",
|
||||||
"bin": "./bin/matrix-appservice-irc",
|
"bin": "./bin/matrix-appservice-irc",
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
"he": "^1.2.0",
|
"he": "^1.2.0",
|
||||||
"logform": "^2.4.0",
|
"logform": "^2.4.0",
|
||||||
"matrix-appservice-bridge": "^3.2.0",
|
"matrix-appservice-bridge": "^3.2.0",
|
||||||
"matrix-org-irc": "^1.2.1",
|
"matrix-org-irc": "1.3.0",
|
||||||
"matrix-bot-sdk": "0.5.19",
|
"matrix-bot-sdk": "0.5.19",
|
||||||
"nopt": "^3.0.1",
|
"nopt": "^3.0.1",
|
||||||
"p-queue": "^6.6.2",
|
"p-queue": "^6.6.2",
|
||||||
|
@ -65,6 +65,6 @@
|
||||||
"proxyquire": "^2.1.3",
|
"proxyquire": "^2.1.3",
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"request-promise-native": "^1.0.9",
|
"request-promise-native": "^1.0.9",
|
||||||
"typescript": "^4.5.5"
|
"typescript": "^4.8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"url": "https://github.com/matrix-org/matrix-appservice-irc",
|
"url": "https://github.com/matrix-org/matrix-appservice-irc",
|
||||||
"rev": "8faf9614e80073e3cf07c96dbd295379d80f4161",
|
"rev": "b52ac9ec9e45fe82fb3eb9c1a5e420c1eba73b9b",
|
||||||
"date": "2022-05-04T09:06:31+02:00",
|
"date": "2022-09-13T09:07:52+01:00",
|
||||||
"path": "/nix/store/sy3v3h9xf4zc9cggavfk720c1pv3hiz2-matrix-appservice-irc",
|
"path": "/nix/store/nd7jrqynfikcirmzc22jp82bgmliglnp-matrix-appservice-irc",
|
||||||
"sha256": "1ihhd1y6jsz98iwrza3fnfinpkpzkn0776wiz6jzdzz71hnb444l",
|
"sha256": "0bw06rzlsi3rddjmw1v32vlpq3clda26dcyq3f8qaily9rdxr7vn",
|
||||||
"fetchLFS": false,
|
"fetchLFS": false,
|
||||||
"fetchSubmodules": false,
|
"fetchSubmodules": false,
|
||||||
"deepClone": false,
|
"deepClone": false,
|
||||||
|
|
Loading…
Reference in a new issue