13 stdenv.mkDerivation rec {
14 pname = "matrix-sdk-crypto-nodejs";
15 version = "0.2.0-beta.1";
17 src = fetchFromGitHub {
19 repo = "matrix-rust-sdk-crypto-nodejs";
21 hash = "sha256-g86RPfhF9XHpbXhHRbyhl920VazCrQyRQrYV6tVCHy4=";
24 cargoDeps = rustPlatform.importCargoLock {
25 lockFile = ./Cargo.lock;
27 "matrix-sdk-base-0.7.0" = "sha256-nCiG4T/MB7gvGrmadKOEbh8+54081PHee9Bm8oY/nl0=";
28 "ruma-0.10.1" = "sha256-Yc5RKk4aRjNIoQsMl30fFehTDCkRO9VvenAvLoVHzXo=";
29 "vodozemac-0.6.0" = "sha256-jJgrJJ0SFcy2oRRZ3ubuKnM2pLO8Tx6NyXordWJjz8o=";
34 rustPlatform.cargoSetupHook
41 buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
46 npm run release-build --offline
54 local -r outPath="$out/lib/node_modules/@matrix-org/${pname}"
56 cp package.json index.js index.d.ts matrix-sdk-crypto.*.node "$outPath"
62 description = "No-network-IO implementation of a state machine that handles E2EE for Matrix clients";
63 homepage = "https://github.com/matrix-org/matrix-rust-sdk-crypto-nodejs";
64 changelog = "https://github.com/matrix-org/matrix-rust-sdk-crypto-nodejs/blob/main/CHANGELOG.md";
65 license = licenses.asl20;
66 maintainers = with maintainers; [
70 inherit (nodejs.meta) platforms;