matrix-sdk-crypto-nodejs: use fetchCargoVendor and refactor

This commit is contained in:
emaryn
2025-03-03 21:33:40 +08:00
parent 1a142a02e3
commit e81f3296ea
2 changed files with 12 additions and 5573 deletions
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "matrix-org";
repo = "matrix-rust-sdk";
rev = "${pname}-v${version}";
tag = "${pname}-v${version}";
hash = "sha256-0p+1cMn9PU+Jk2JW7G+sdzxhMaI3gEAk5w2nm05oBSU=";
};
@@ -27,11 +27,14 @@ stdenv.mkDerivation rec {
./remove-duplicate-dependency.patch
];
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo-beta.3.lock;
outputHashes = {
"uniffi-0.21.0" = "sha256-blKCfCsSNtr8NtO7Let7VJ/9oGuW9Eu8j9A6/oHUcP0=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit
pname
version
src
patches
;
hash = "sha256-utpqRh5FIVgEX0dbYIS3GL/np6g6Itz8t27ov5CBrG8=";
};
nativeBuildInputs = [
@@ -63,11 +66,11 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
meta = with lib; {
meta = {
description = "No-network-IO implementation of a state machine that handles E2EE for Matrix clients";
homepage = "https://github.com/matrix-org/matrix-rust-sdk/tree/${src.rev}/bindings/matrix-sdk-crypto-nodejs";
license = licenses.asl20;
maintainers = with maintainers; [
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
winter
dandellion
];