nixpkgs/pkgs/development/tools/wasm-bindgen-cli/default.nix
Joe Neeman b6910512a0 wasm-bindgen-cli: 0.2.84 -> 0.2.87
Also allow overriding the version
2023-08-02 17:47:26 -05:00

40 lines
972 B
Nix

{ lib
, rustPlatform
, fetchCrate
, nodejs
, pkg-config
, openssl
, stdenv
, curl
, Security
, version ? "0.2.87"
, hash ? "sha256-0u9bl+FkXEK2b54n7/l9JOCtKo+pb42GF9E1EnAUQa0="
, cargoHash ? "sha256-AsZBtE2qHJqQtuCt/wCAgOoxYMfvDh8IzBPAOkYSYko="
}:
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; [ nitsky rizary ];
mainProgram = "wasm-bindgen";
};
}