nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ rustPlatform, fetchFromGitHub, lib, openssl, pkgconfig, stdenv, curl, Security, ... }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "wasm-bindgen-cli";
5 version = "0.2.60";
6
7 src = fetchFromGitHub {
8 owner = "rustwasm";
9 repo = "wasm-bindgen";
10 rev = version;
11 sha256 = "1jr4v5y9hbkyg8gjkr3qc2qxwhyagfs8q3y3z248mr1919mcas8h";
12 };
13
14 buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ];
15 nativeBuildInputs = [ pkgconfig ];
16
17 cargoSha256 = "0wrdzxnnk3bbgm9p59p9rd00bm6wsb3qxmcld8967ibaasbfk0a4";
18 cargoPatches = [ ./0001-Add-cargo.lock.patch ];
19 cargoBuildFlags = [ "-p" pname ];
20
21 meta = with lib; {
22 homepage = https://rustwasm.github.io/docs/wasm-bindgen/;
23 license = licenses.asl20;
24 description = "Facilitating high-level interactions between wasm modules and JavaScript";
25 maintainers = with maintainers; [ ma27 ];
26 platforms = platforms.unix;
27 };
28}