2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2023-07-15 17:15:38 +00:00
|
|
|
pname = "cargo-component";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "0.17.0";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bytecodealliance";
|
|
|
|
repo = "cargo-component";
|
2023-10-19 13:55:26 +00:00
|
|
|
rev = "v${version}";
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-j1gQgtse3DQWyR4D5BzQ0aAEGhNKoFT0ACRBVOqDdFE=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
cargoHash = "sha256-1YDnqopghS6MpQ2h8e5kQj0bxKAC2B6XzVeC60+M3MM=";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2023-11-16 04:20:00 +00:00
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# requires the wasm32-wasi target
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Cargo subcommand for creating WebAssembly components based on the component model proposal";
|
2023-07-15 17:15:38 +00:00
|
|
|
homepage = "https://github.com/bytecodealliance/cargo-component";
|
2023-10-19 13:55:26 +00:00
|
|
|
changelog = "https://github.com/bytecodealliance/cargo-component/releases/tag/${src.rev}";
|
2023-07-15 17:15:38 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
2023-10-19 13:55:26 +00:00
|
|
|
mainProgram = "cargo-component";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
}
|