2021-10-16 18:07:49 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
|
|
|
, nodejs
|
2021-06-08 21:22:26 +00:00
|
|
|
, pkg-config
|
2021-10-16 18:07:49 +00:00
|
|
|
, openssl
|
2021-06-08 21:22:26 +00:00
|
|
|
, stdenv
|
|
|
|
, curl
|
|
|
|
, Security
|
2020-07-17 11:50:13 +00:00
|
|
|
, runCommand
|
|
|
|
}:
|
2019-08-29 19:43:15 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wasm-bindgen-cli";
|
2022-04-08 15:15:58 +00:00
|
|
|
version = "0.2.80";
|
2019-08-29 19:43:15 +00:00
|
|
|
|
2021-10-16 18:07:49 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2022-04-08 15:15:58 +00:00
|
|
|
sha256 = "sha256-f3XRVuK892TE6xP7eq3aKpl9d3fnOFxLh+/K59iWPAg=";
|
2021-10-16 18:07:49 +00:00
|
|
|
};
|
|
|
|
|
2022-04-08 15:15:58 +00:00
|
|
|
cargoSha256 = "sha256-WJ5hPw2mzZB+GMoqo3orhl4fCFYKWXOWqaFj1EMrb2Q=";
|
2021-10-16 18:07:49 +00:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-08-29 19:43:15 +00:00
|
|
|
|
2021-10-16 18:07:49 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ curl Security ];
|
|
|
|
|
|
|
|
checkInputs = [ nodejs ];
|
|
|
|
|
|
|
|
# other tests require it to be ran in the wasm-bindgen monorepo
|
|
|
|
cargoTestFlags = [ "--test=interface-types" ];
|
2019-08-29 19:43:15 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://rustwasm.github.io/docs/wasm-bindgen/";
|
2021-10-16 18:07:49 +00:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2019-08-29 19:43:15 +00:00
|
|
|
description = "Facilitating high-level interactions between wasm modules and JavaScript";
|
2021-08-10 14:51:16 +00:00
|
|
|
maintainers = with maintainers; [ ma27 nitsky rizary ];
|
2021-10-16 18:07:49 +00:00
|
|
|
mainProgram = "wasm-bindgen";
|
2019-08-29 19:43:15 +00:00
|
|
|
};
|
|
|
|
}
|