3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/wasm-bindgen-cli/default.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

2021-06-08 22:22:26 +01:00
{ rustPlatform
, fetchFromGitHub
, lib
, openssl
, pkg-config
, stdenv
, curl
, Security
, runCommand
}:
rustPlatform.buildRustPackage rec {
pname = "wasm-bindgen-cli";
2021-10-13 11:01:45 +01:00
version = "0.2.78";
src =
let
tarball = fetchFromGitHub {
owner = "rustwasm";
repo = "wasm-bindgen";
rev = version;
2021-10-13 11:01:45 +01:00
hash = "sha256-1Z5d4gjZUic6Yrd+O8oLWYpJqAYGcByZYP0H1iInXHA=";
};
2021-06-08 22:22:26 +01:00
in
runCommand "source" { } ''
cp -R ${tarball} $out
chmod -R +w $out
cp ${./Cargo.lock} $out/Cargo.lock
'';
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ];
nativeBuildInputs = [ pkg-config ];
2021-10-13 11:01:45 +01:00
cargoHash = "sha256-RixIEat7EzGzgSQTnPennePpiucmAatrDGhbFSfTajo=";
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";
2021-08-10 15:51:16 +01:00
maintainers = with maintainers; [ ma27 nitsky rizary ];
platforms = platforms.unix;
};
}