1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5}:
6
7rustPlatform.buildRustPackage rec {
8 pname = "wit-bindgen";
9 version = "0.43.0";
10
11 src = fetchFromGitHub {
12 owner = "bytecodealliance";
13 repo = "wit-bindgen";
14 rev = "v${version}";
15 hash = "sha256-fysraQTB1+GIeXagXVAUEp1iKCX1zZNL/7UqsTLkAbg=";
16 };
17
18 cargoHash = "sha256-A5HhJwH29U5nFVIyPrgPxpCiLLBo4zEqtApO8lv/5us=";
19
20 # Some tests fail because they need network access to install the `wasm32-unknown-unknown` target.
21 # However, GitHub Actions ensures a proper build.
22 # See also:
23 # https://github.com/bytecodealliance/wit-bindgen/actions
24 # https://github.com/bytecodealliance/wit-bindgen/blob/main/.github/workflows/main.yml
25 doCheck = false;
26
27 meta = with lib; {
28 description = "Language binding generator for WebAssembly interface types";
29 homepage = "https://github.com/bytecodealliance/wit-bindgen";
30 license = licenses.asl20;
31 maintainers = with maintainers; [ xrelkd ];
32 mainProgram = "wit-bindgen";
33 };
34}