Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Mar 5, 2024
1 parent 99edc66 commit 75ff9ff
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions nix/zome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,28 @@ let
pname = crate;
doCheck = false;
};
finalWasm = if optimizeWasm then
in
if optimizeWasm then
stdenv.mkDerivation {
name = crate;
buildInputs = [ wasm binaryen ];
phases = [ "buildPhase" ];
buildPhase = ''
wasm-opt --strip-debug -Oz -o $out ${wasm}/lib/${crate}.wasm
'';
meta = {
holochainPackageType = "zome";
};
}
else
stdenv.mkDerivation {
name = crate;
buildInputs = [ wasm ];
phases = [ "buildPhase" ];
buildPhase = ''
cp ${wasm}/lib/${crate}.wasm $out
'';
meta = {
holochainPackageType = "zome";
};
}
else wasm;
in
stdenv.mkDerivation {
name = crate;
buildInputs = [ finalWasm ];
phases = [ "buildPhase" ];
buildPhase = ''
cp ${wasm}/lib/${crate}.wasm $out
'';
meta = {
holochainPackageType = "zome";
};
}

0 comments on commit 75ff9ff

Please sign in to comment.