depot/third_party/nixpkgs/pkgs/development/tools/rust/cargo-component/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

47 lines
1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, stdenv
, darwin
}:
rustPlatform.buildRustPackage {
pname = "cargo-component";
version = "unstable-2023-09-20";
src = fetchFromGitHub {
owner = "bytecodealliance";
repo = "cargo-component";
rev = "9bfbdeabee2e91894059c1f061f0c18931428823";
hash = "sha256-ZLhW2aIpibU4YX5f40BqQ0tKENY4row+FIl3d/hi3dY=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"warg-api-0.1.0" = "sha256-kzxvGZUMUOueR8t1tiCpGJlPxqEHQMb1m1jhPYoatbA=";
};
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
# requires the wasm32-wasi target
doCheck = false;
meta = with lib; {
description = "A Cargo subcommand for creating WebAssembly components based on the component model proposal";
homepage = "https://github.com/bytecodealliance/cargo-component";
license = licenses.asl20;
maintainers = with maintainers; [ figsoda ];
};
}