Skip to content

Commit

Permalink
flake: add kairos-deposit-contract wasm32 build-output
Browse files Browse the repository at this point in the history
  • Loading branch information
marijanp committed Feb 23, 2024
1 parent f9692e5 commit e49c77d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,21 @@
];
perSystem = { config, self', inputs', system, pkgs, lib, ... }:
let
rustToolchain = inputs'.fenix.packages.stable.toolchain;
rustToolchain = with inputs'.fenix.packages; combine [
complete.toolchain
targets.wasm32-unknown-unknown.latest.rust-std
];
craneLib = inputs.crane.lib.${system}.overrideToolchain rustToolchain;

kairosOnChainAttrs = {
src = lib.cleanSourceWith {
src = craneLib.path ./kairos-deposit-contract;
filter = path: type: craneLib.filterCargoSources path type;
};
cargoExtraArgs = "--target wasm32-unknown-unknown";
doCheck = false;
};

kairosNodeAttrs = {
src = lib.cleanSourceWith {
src = craneLib.path ./.;
Expand Down Expand Up @@ -73,6 +85,14 @@
cargoArtifacts = self'.packages.kairos-deps;
});

kairos-deposit-contract-deps = craneLib.buildPackage (kairosOnChainAttrs // {
pname = "kairos-deposit-contract";
});

kairos-deposit-contract = craneLib.buildPackage (kairosOnChainAttrs // {
cargoArtifacts = self'.packages.kairos-deposit-contract-deps;
});

default = self'.packages.kairos;

kairos-docs = craneLib.cargoDoc (kairosNodeAttrs // {
Expand Down

0 comments on commit e49c77d

Please sign in to comment.