btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / wi / wit-bindgen / package.nix
blobd619491020ee9262ab603dd3b424443b5a20c59b
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 }:
6 rustPlatform.buildRustPackage rec {
7   pname = "wit-bindgen";
8   version = "0.34.0";
10   src = fetchFromGitHub {
11     owner = "bytecodealliance";
12     repo = "wit-bindgen";
13     rev = "v${version}";
14     hash = "sha256-ZnMQpIfKN6ByEZasvy+UM12ZBsrhTM1s3TN1dF/3YMY=";
15   };
17   cargoHash = "sha256-eF1qJ0fH3ODG1u9tUD3dj/2i7+0BJ4fJPlaYjS3XiGU=";
19   # Some tests fail because they need network access to install the `wasm32-unknown-unknown` target.
20   # However, GitHub Actions ensures a proper build.
21   # See also:
22   #   https://github.com/bytecodealliance/wit-bindgen/actions
23   #   https://github.com/bytecodealliance/wit-bindgen/blob/main/.github/workflows/main.yml
24   doCheck = false;
26   meta = with lib; {
27     description = "Language binding generator for WebAssembly interface types";
28     homepage = "https://github.com/bytecodealliance/wit-bindgen";
29     license = licenses.asl20;
30     maintainers = with maintainers; [ xrelkd ];
31     mainProgram = "wit-bindgen";
32   };