2021-10-16 20:07:49 +02:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
|
|
|
, nodejs
|
2021-06-08 23:22:26 +02:00
|
|
|
, pkg-config
|
2021-10-16 20:07:49 +02:00
|
|
|
, openssl
|
2021-06-08 23:22:26 +02:00
|
|
|
, stdenv
|
|
|
|
, curl
|
|
|
|
, Security
|
2020-07-17 13:50:13 +02:00
|
|
|
, runCommand
|
|
|
|
}:
|
2019-08-29 21:43:15 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wasm-bindgen-cli";
|
2021-10-13 12:01:45 +02:00
|
|
|
version = "0.2.78";
|
2019-08-29 21:43:15 +02:00
|
|
|
|
2021-10-16 20:07:49 +02:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "sha256-5s+HidnVfDV0AXA+/YcXNGVjv/E9JeK0Ttng4mCVX8M=";
|
|
|
|
};
|
|
|
|
|
|
|
|
cargoSha256 = "sha256-CbtjUFwowP/QqyAMCzmUiSib4EpRhQAmO4ekX00xYGE=";
|
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-08-29 21:43:15 +02:00
|
|
|
|
2021-10-16 20:07:49 +02: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 21:43:15 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://rustwasm.github.io/docs/wasm-bindgen/";
|
2021-10-16 20:07:49 +02:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2019-08-29 21:43:15 +02:00
|
|
|
description = "Facilitating high-level interactions between wasm modules and JavaScript";
|
2021-08-10 16:51:16 +02:00
|
|
|
maintainers = with maintainers; [ ma27 nitsky rizary ];
|
2021-10-16 20:07:49 +02:00
|
|
|
mainProgram = "wasm-bindgen";
|
2019-08-29 21:43:15 +02:00
|
|
|
};
|
|
|
|
}
|