2021-01-19 06:50:56 +00:00
|
|
|
{ rustPlatform, fetchFromGitHub, lib, openssl, pkg-config, stdenv, curl, Security
|
2020-07-17 11:50:13 +00:00
|
|
|
, runCommand
|
|
|
|
}:
|
2019-08-29 19:43:15 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wasm-bindgen-cli";
|
2020-12-17 13:06:38 +00:00
|
|
|
version = "0.2.69";
|
2019-08-29 19:43:15 +00:00
|
|
|
|
2020-07-17 11:50:13 +00:00
|
|
|
src =
|
|
|
|
let
|
|
|
|
tarball = fetchFromGitHub {
|
|
|
|
owner = "rustwasm";
|
|
|
|
repo = "wasm-bindgen";
|
|
|
|
rev = version;
|
2020-12-17 13:06:38 +00:00
|
|
|
sha256 = "1psylk3hlx0ahwib3ph8qdk0jwlp8qzc6dv61002rj7ns28vs4mx";
|
2020-07-17 11:50:13 +00:00
|
|
|
};
|
|
|
|
in runCommand "source" { } ''
|
|
|
|
cp -R ${tarball} $out
|
|
|
|
chmod -R +w $out
|
|
|
|
cp ${./Cargo.lock} $out/Cargo.lock
|
|
|
|
'';
|
2019-08-29 19:43:15 +00:00
|
|
|
|
|
|
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ];
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2019-08-29 19:43:15 +00:00
|
|
|
|
2020-12-17 13:06:38 +00:00
|
|
|
cargoSha256 = "1wrfly7c3an1mjqm7v13mlvx57hwlcxfjijkimicck04q6qdhbp6";
|
2019-08-29 19:43:15 +00:00
|
|
|
cargoBuildFlags = [ "-p" pname ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://rustwasm.github.io/docs/wasm-bindgen/";
|
2019-08-29 19:43:15 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
description = "Facilitating high-level interactions between wasm modules and JavaScript";
|
2020-12-17 13:06:38 +00:00
|
|
|
maintainers = with maintainers; [ ma27 rizary ];
|
2019-08-29 19:43:15 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|