2023-03-22 17:54:04 -04:00
|
|
|
let
|
|
|
|
my-lib = import ../lib/lib.nix;
|
|
|
|
in
|
|
|
|
{ pkgs
|
|
|
|
, lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchCrate
|
|
|
|
, nodejs
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, stdenv
|
|
|
|
, curl
|
|
|
|
, runCommand
|
|
|
|
}:
|
|
|
|
|
|
|
|
# This package is special so we don't use the naersk infrastructure to build it.
|
|
|
|
# Instead we crib from the nixpkgs version with some tweaks to work with our
|
|
|
|
# flake setup.
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "wasm-bindgen-cli";
|
|
|
|
# NOTE(jwall): This must exactly match the version of the wasm-bindgen crate
|
|
|
|
# we are using.
|
2023-12-02 15:29:47 -05:00
|
|
|
version = "0.2.89";
|
2023-03-22 17:54:04 -04:00
|
|
|
|
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2023-12-02 15:29:47 -05:00
|
|
|
sha256 = "sha256-IPxP68xtNSpwJjV2yNMeepAS0anzGl02hYlSTvPocz8=";
|
2023-03-22 17:54:04 -04:00
|
|
|
};
|
|
|
|
|
2023-12-02 15:29:47 -05:00
|
|
|
cargoSha256 = "sha256-pBeQaG6i65uJrJptZQLuIaCb/WCQMhba1Z1OhYqA8Zc=";
|
2023-03-22 17:54:04 -04:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
|
|
|
|
buildInputs = [ openssl curl ] ++ (my-lib.darwin-sdk pkgs);
|
|
|
|
|
|
|
|
nativeCheckInputs = [ nodejs ];
|
|
|
|
|
|
|
|
# other tests require it to be ran in the wasm-bindgen monorepo
|
2023-12-02 15:29:47 -05:00
|
|
|
cargoTestFlags = [ "--test=reference" ];
|
|
|
|
}
|