nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ rustPlatform, fetchFromGitHub, lib, openssl, pkg-config, stdenv, curl, Security
2, runCommand
3}:
4
5rustPlatform.buildRustPackage rec {
6 pname = "wasm-bindgen-cli";
7 version = "0.2.73";
8
9 src =
10 let
11 tarball = fetchFromGitHub {
12 owner = "rustwasm";
13 repo = "wasm-bindgen";
14 rev = version;
15 sha256 = "sha256-JrfS9Z/ZqhoZXJxrxMSLpl2NiktTUkjW6q3xN9AU2zw=";
16 };
17 in runCommand "source" { } ''
18 cp -R ${tarball} $out
19 chmod -R +w $out
20 cp ${./Cargo.lock} $out/Cargo.lock
21 '';
22
23 buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security curl ];
24 nativeBuildInputs = [ pkg-config ];
25
26 cargoSha256 = "sha256-GUdoOms4FrNmPkELFX1PXcU/ww7CSN8JGHoCvnm73PQ=";
27 cargoBuildFlags = [ "-p" pname ];
28
29 meta = with lib; {
30 homepage = "https://rustwasm.github.io/docs/wasm-bindgen/";
31 license = licenses.asl20;
32 description = "Facilitating high-level interactions between wasm modules and JavaScript";
33 maintainers = with maintainers; [ ma27 rizary ];
34 platforms = platforms.unix;
35 };
36}