monorepo/kifu/kifu-wasm/default.nix

20 lines
468 B
Nix
Raw Normal View History

{ pkgs, typeshare, wasm-pack, rustc }:
let
customBuildInfo = pkgs: pkgs.buildRustCrate.override {
inherit rustc;
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
kifu-wasm = attrs: {
buildInputs = [
typeshare
];
extraRustcOpts = [ "--target wasm32-unknown-unknown" ];
};
};
};
in (import ./Cargo.nix {
inherit pkgs;
buildRustCrateForPkgs = customBuildInfo;
release = true;
}).rootCrate.build