lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

matrix-sdk-crypto-nodejs: init at 0.1.0-beta.2

+114
+65
pkgs/development/libraries/matrix-sdk-crypto-nodejs/default.nix
··· 1 + { lib, stdenv, fetchFromGitHub, rustPlatform, napi-rs-cli, nodejs, libiconv }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "matrix-sdk-crypto-nodejs"; 5 + version = "0.1.0-beta.2"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "matrix-org"; 9 + repo = "matrix-rust-sdk"; 10 + rev = "${pname}-v${version}"; 11 + hash = "sha256-E++0tm/2d8/3zAXwovJ71uF2sxDORWyJNnA3e1Q3NLA="; 12 + }; 13 + 14 + patches = [ 15 + # This is needed because two versions of indexed_db_futures are present (which will fail to vendor, see https://github.com/rust-lang/cargo/issues/10310). 16 + # (matrix-sdk-crypto-nodejs doesn't use this dependency, we only need to remove it to vendor the dependencies successfully.) 17 + ./remove-duplicate-dependency.patch 18 + ]; 19 + 20 + cargoDeps = rustPlatform.fetchCargoTarball { 21 + inherit src patches; 22 + name = "${pname}-${version}"; 23 + hash = "sha256-G2Um7vHinOuOx9U2BH14LAx+s/0Sxtlc9Nz6nPJfmU8="; 24 + }; 25 + 26 + postPatch = '' 27 + cd bindings/${pname} 28 + ''; 29 + 30 + nativeBuildInputs = [ 31 + rustPlatform.cargoSetupHook 32 + rustPlatform.rust.cargo 33 + rustPlatform.rust.rustc 34 + napi-rs-cli 35 + nodejs 36 + ]; 37 + 38 + buildInputs = lib.optionals stdenv.isDarwin [ libiconv ]; 39 + 40 + buildPhase = '' 41 + runHook preBuild 42 + 43 + npm run release-build --offline 44 + 45 + runHook postBuild 46 + ''; 47 + 48 + installPhase = '' 49 + runHook preInstall 50 + 51 + local -r outPath="$out/lib/node_modules/@matrix-org/${pname}" 52 + mkdir -p "$outPath" 53 + cp package.json index.js index.d.ts matrix-sdk-crypto.*.node "$outPath" 54 + 55 + runHook postInstall 56 + ''; 57 + 58 + meta = with lib; { 59 + description = "A no-network-IO implementation of a state machine that handles E2EE for Matrix clients"; 60 + homepage = "https://github.com/matrix-org/matrix-rust-sdk/tree/${src.rev}/bindings/matrix-sdk-crypto-nodejs"; 61 + license = licenses.asl20; 62 + maintainers = with maintainers; [ winter ]; 63 + inherit (nodejs.meta) platforms; 64 + }; 65 + }
+47
pkgs/development/libraries/matrix-sdk-crypto-nodejs/remove-duplicate-dependency.patch
··· 1 + diff --git a/Cargo.lock b/Cargo.lock 2 + index 2ddfdd0..3fcca5f 100644 3 + --- a/Cargo.lock 4 + +++ b/Cargo.lock 5 + @@ -1985,20 +1985,6 @@ version = "0.3.3" 6 + source = "registry+https://github.com/rust-lang/crates.io-index" 7 + checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" 8 + 9 + -[[package]] 10 + -name = "indexed_db_futures" 11 + -version = "0.2.3" 12 + -source = "registry+https://github.com/rust-lang/crates.io-index" 13 + -checksum = "d26ac735f676c52305becf53264b91cea9866a8de61ccbf464405b377b9cbca9" 14 + -dependencies = [ 15 + - "cfg-if", 16 + - "js-sys", 17 + - "uuid 0.8.2", 18 + - "wasm-bindgen", 19 + - "wasm-bindgen-futures", 20 + - "web-sys", 21 + -] 22 + - 23 + [[package]] 24 + name = "indexed_db_futures" 25 + version = "0.2.3" 26 + @@ -2558,8 +2544,7 @@ dependencies = [ 27 + "derive_builder", 28 + "futures-util", 29 + "getrandom 0.2.7", 30 + - "indexed_db_futures 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 31 + - "indexed_db_futures 0.2.3 (git+https://github.com/Hywan/rust-indexed-db?branch=feat-factory-nodejs)", 32 + + "indexed_db_futures", 33 + "js-sys", 34 + "matrix-sdk-base", 35 + "matrix-sdk-common", 36 + diff --git a/crates/matrix-sdk-indexeddb/Cargo.toml b/crates/matrix-sdk-indexeddb/Cargo.toml 37 + index 7f23dfc..c57e29a 100644 38 + --- a/crates/matrix-sdk-indexeddb/Cargo.toml 39 + +++ b/crates/matrix-sdk-indexeddb/Cargo.toml 40 + @@ -30,7 +30,6 @@ js-sys = { version = "0.3.58" } 41 + matrix-sdk-base = { version = "0.6.0", path = "../matrix-sdk-base", features = ["js"] } 42 + matrix-sdk-crypto = { version = "0.6.0", path = "../matrix-sdk-crypto", features = ["js"], optional = true } 43 + matrix-sdk-store-encryption = { version = "0.2.0", path = "../matrix-sdk-store-encryption" } 44 + -indexed_db_futures = "0.2.3" 45 + indexed_db_futures_nodejs = { package = "indexed_db_futures", git = "https://github.com/Hywan/rust-indexed-db", branch = "feat-factory-nodejs", optional = true } 46 + ruma = "0.7.0" 47 + serde = "1.0.136"
+2
pkgs/top-level/all-packages.nix
··· 8946 8946 sasl = gsasl; 8947 8947 }; 8948 8948 8949 + matrix-sdk-crypto-nodejs = callPackage ../development/libraries/matrix-sdk-crypto-nodejs { }; 8950 + 8949 8951 email = callPackage ../tools/networking/email { }; 8950 8952 8951 8953 maim = callPackage ../tools/graphics/maim {};