1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 openssl,
7}:
8
9rustPlatform.buildRustPackage rec {
10 pname = "cargo-component";
11 version = "0.21.1";
12
13 src = fetchFromGitHub {
14 owner = "bytecodealliance";
15 repo = "cargo-component";
16 rev = "v${version}";
17 hash = "sha256-Tlx14q/2k/0jZZ1nECX7zF/xNTeMCZg/fN+fhRM4uhc=";
18 };
19
20 cargoHash = "sha256-ZwxVhoqAzkaIgcH9GMR+IGkJ6IOQVtmt0qcDjdix6cU=";
21
22 nativeBuildInputs = [
23 pkg-config
24 ];
25
26 buildInputs = [
27 openssl
28 ];
29
30 # requires the wasm32-wasi target
31 doCheck = false;
32
33 meta = with lib; {
34 description = "Cargo subcommand for creating WebAssembly components based on the component model proposal";
35 homepage = "https://github.com/bytecodealliance/cargo-component";
36 changelog = "https://github.com/bytecodealliance/cargo-component/releases/tag/${src.rev}";
37 license = licenses.asl20;
38 maintainers = with maintainers; [ figsoda ];
39 mainProgram = "cargo-component";
40 };
41}