Skip to content

Commit

Permalink
feat: update nix
Browse files Browse the repository at this point in the history
  • Loading branch information
ryutamago committed Nov 21, 2024
1 parent 97d7bab commit 6dd2e79
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions nix/crates.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@
# in the `jstz_cli` crate. This is a dummy kernel that is used to
# build the `jstz_cli` crate. See the `jstz_cli` derivation below
# for building the actual kernel.
preBuildPhases = ["mkDummyJstzKernelForCli"];
mkDummyJstzKernelForCli = ''
# preBuildPhases = ["mkDummyJstzKernelForCli"];
# mkDummyJstzKernelForCli = ''
# touch ./crates/jstz_cli/jstz_kernel.wasm
# '';

preBuildPhases = ["mkDummyKernels"];
mkDummyKernels = ''
touch ./crates/jstz_cli/jstz_kernel.wasm
touch ./crates/jstzd/resources/jstz_rollup/jstz_kernel.wasm
'';
};

Expand Down Expand Up @@ -107,7 +113,15 @@ in {
jstz_proto = crate "jstz_proto";
jstz_rollup = crate "jstz_rollup";
jstz_wpt = crate "jstz_wpt";
jstzd = crate "jstzd";
jstzd = craneLib.buildPackage (commonWorkspace
// rec {
pname = "jstzd";
cargoExtraArgs = "-p ${pname}";
preBuildPhases = ["mkJstzKernelForJstzd"];
mkJstzKernelForJstzd = ''
cp ${jstz_kernel}/lib/jstz_kernel.wasm ./crates/jstzd/resources/jstz_rollup/jstz_kernel.wasm
'';
});
octez = crate "octez";

# Special target to build all crates in the workspace
Expand Down

0 comments on commit 6dd2e79

Please sign in to comment.