39 lines
965 B
Nix
39 lines
965 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchCrate
|
|
, nodejs
|
|
, pkg-config
|
|
, openssl
|
|
, stdenv
|
|
, curl
|
|
, Security
|
|
, version ? "0.2.89"
|
|
, hash ? "sha256-IPxP68xtNSpwJjV2yNMeepAS0anzGl02hYlSTvPocz8="
|
|
, cargoHash ? "sha256-pBeQaG6i65uJrJptZQLuIaCb/WCQMhba1Z1OhYqA8Zc="
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "wasm-bindgen-cli";
|
|
inherit version hash cargoHash;
|
|
|
|
src = fetchCrate {
|
|
inherit pname version hash;
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ curl Security ];
|
|
|
|
nativeCheckInputs = [ nodejs ];
|
|
|
|
# tests require it to be ran in the wasm-bindgen monorepo
|
|
doCheck = false;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://rustwasm.github.io/docs/wasm-bindgen/";
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
description = "Facilitating high-level interactions between wasm modules and JavaScript";
|
|
maintainers = with maintainers; [ rizary ];
|
|
mainProgram = "wasm-bindgen";
|
|
};
|
|
}
|