2023-05-04 00:19:01 +00:00
|
|
|
{ pkgs, typeshare, wasm-pack, rustc }:
|
2023-05-03 20:20:47 +00:00
|
|
|
let
|
|
|
|
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
|
2023-05-04 00:19:01 +00:00
|
|
|
inherit rustc;
|
2023-05-03 20:20:47 +00:00
|
|
|
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
|
|
|
|
kifu-wasm = attrs: {
|
|
|
|
buildInputs = [
|
|
|
|
typeshare
|
|
|
|
];
|
2023-05-04 00:19:01 +00:00
|
|
|
extraRustcOpts = [ "--target wasm32-unknown-unknown" ];
|
2023-05-03 20:20:47 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in (import ./Cargo.nix {
|
|
|
|
inherit pkgs;
|
|
|
|
buildRustCrateForPkgs = customBuildInfo;
|
|
|
|
release = true;
|
|
|
|
}).rootCrate.build
|
|
|
|
|