Skip to content

Commit

Permalink
Attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Feb 22, 2024
1 parent 491f2fb commit 72e3b2e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nix/zome.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
crate,
stdenv,
binaryen,
craneLib,
Expand All @@ -11,15 +10,20 @@

let
cargoExtraArgs = "--workspace ${if excludedCrates != null then builtins.concatStringsSep " " (builtins.map (excludedCrate: ''--exclude ${excludedCrate}'') excludedCrates) else ''''}";

cargoToml = cratePath + /Cargo.toml;
crateToml = builtins.fromTOML (builtins.readFile cargoToml);
crate = crateToml.package.name;

wasmDeps = craneLib.buildDepsOnly {
inherit cargoExtraArgs;
src = craneLib.cleanCargoSource (craneLib.path workspacePath);
CARGO_BUILD_TARGET = "wasm32-unknown-unknown";
doCheck = false;
};
wasm = craneLib.buildPackage {
inherit cargoToml;
src = craneLib.cleanCargoSource (craneLib.path cratePath);
cargoToml = cratePath + /Cargo.toml;
cargoLock = workspacePath + /Cargo.lock;
CARGO_BUILD_TARGET = "wasm32-unknown-unknown";
cargoArtifacts = wasmDeps;
Expand Down

0 comments on commit 72e3b2e

Please sign in to comment.