1{
2 lib,
3 rustPlatform,
4 fetchCrate,
5 nix-update-script,
6 nodejs_latest,
7 pkg-config,
8 openssl,
9 stdenv,
10 curl,
11}:
12
13{
14 version ? src.version,
15 src,
16 cargoDeps,
17}:
18
19rustPlatform.buildRustPackage {
20 pname = "wasm-bindgen-cli";
21
22 inherit version src cargoDeps;
23
24 nativeBuildInputs = [ pkg-config ];
25
26 buildInputs = [
27 openssl
28 ]
29 ++ lib.optionals stdenv.hostPlatform.isDarwin [
30 curl
31 ];
32
33 nativeCheckInputs = [ nodejs_latest ];
34
35 # tests require it to be ran in the wasm-bindgen monorepo
36 doCheck = false;
37
38 passthru.updateScript = nix-update-script { };
39
40 meta = {
41 homepage = "https://rustwasm.github.io/docs/wasm-bindgen/";
42 license = with lib.licenses; [
43 asl20 # or
44 mit
45 ];
46 description = "Facilitating high-level interactions between wasm modules and JavaScript";
47 maintainers = with lib.maintainers; [ rizary ];
48 mainProgram = "wasm-bindgen";
49 };
50}