37 lines
1.0 KiB
Nix
37 lines
1.0 KiB
Nix
{ rustPlatform, fetchFromGitHub, lib, openssl, pkgconfig, stdenv, curl, Security
|
|
, runCommand
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "wasm-bindgen-cli";
|
|
version = "0.2.65";
|
|
|
|
src =
|
|
let
|
|
tarball = fetchFromGitHub {
|
|
owner = "rustwasm";
|
|
repo = "wasm-bindgen";
|
|
rev = version;
|
|
sha256 = "0qfz5x2hmfxz0kjc1biki0748d4qi8ws0b4bx9y2fs8dgbnppkzf";
|
|
};
|
|
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 = [ pkgconfig ];
|
|
|
|
cargoSha256 = "1rjf4f8hm4vqjcdhi7s5az8p5633dg425m8hh32kakq1ar06pfvj";
|
|
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;
|
|
};
|
|
}
|