nixpkgs/pkgs/development/tools/wasm-bindgen-cli/default.nix

29 lines
930 B
Nix

{ rustPlatform, fetchFromGitHub, lib, openssl, pkgconfig, stdenv, curl, Security, ... }:
rustPlatform.buildRustPackage rec {
pname = "wasm-bindgen-cli";
version = "0.2.55";
src = fetchFromGitHub {
owner = "rustwasm";
repo = "wasm-bindgen";
rev = version;
sha256 = "13pcfrdf3nk4mrc7lqpz9qjdh7gfpqf849iywcyjk3f9y8sm46ii";
};
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ];
nativeBuildInputs = [ pkgconfig ];
cargoSha256 = "0mpq40llddqj7syi07pfhr48kndx35f1hyf5pvx5zdnfz29a924v";
cargoPatches = [ ./0001-Add-cargo.lock-for-0.2.55.patch ];
cargoBuildFlags = [ "-p" pname ];
meta = with lib; {
homepage = https://rustwasm.github.io/docs/wasm-bindgen/;
license = licenses.asl20;
description = "Facilitating high-level interactions between wasm modules and JavaScript";
maintainers = with maintainers; [ ma27 ];
platforms = platforms.unix;
};
}