2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
2024-02-29 20:09:43 +00:00
|
|
|
, nix-update-script
|
2021-10-17 09:34:42 +00:00
|
|
|
, nodejs
|
2021-06-28 23:13:55 +00:00
|
|
|
, pkg-config
|
2021-10-17 09:34:42 +00:00
|
|
|
, openssl
|
2021-06-28 23:13:55 +00:00
|
|
|
, stdenv
|
|
|
|
, curl
|
|
|
|
, Security
|
2024-02-29 20:09:43 +00:00
|
|
|
, version ? "0.2.91"
|
|
|
|
, hash ? "sha256-f/RK6s12ItqKJWJlA2WtOXtwX4Y0qa8bq/JHlLTAS3c="
|
|
|
|
, cargoHash ? "sha256-3vxVI0BhNz/9m59b+P2YEIrwGwlp7K3pyPKt4VqQuHE="
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wasm-bindgen-cli";
|
2023-08-04 22:07:22 +00:00
|
|
|
inherit version hash cargoHash;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
src = fetchCrate {
|
2023-08-04 22:07:22 +00:00
|
|
|
inherit pname version hash;
|
2021-10-17 09:34:42 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ curl Security ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ nodejs ];
|
2021-10-17 09:34:42 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
# tests require it to be ran in the wasm-bindgen monorepo
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://rustwasm.github.io/docs/wasm-bindgen/";
|
2021-10-17 09:34:42 +00:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Facilitating high-level interactions between wasm modules and JavaScript";
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ rizary ];
|
2021-10-17 09:34:42 +00:00
|
|
|
mainProgram = "wasm-bindgen";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|