Skip to content

Commit

Permalink
Merge pull request #121 from mlabs-haskell/jared/114-leftovers-lbf-pu…
Browse files Browse the repository at this point in the history
…rescript

Added `lbf-prelude-to-purescript` and `lbf-plutus-to-purescript` scripts to the frontend
  • Loading branch information
jaredponn authored Oct 24, 2023
2 parents c1e5a31 + 2620e4e commit 29e061b
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions lambda-buffers-frontend/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
config.packages.lbf-pure
config.packages.lbf-prelude-to-haskell
config.packages.lbf-plutus-to-haskell
config.packages.lbf-prelude-to-purescript
config.packages.lbf-plutus-to-purescript
];
};
};
Expand Down Expand Up @@ -123,6 +125,40 @@
work-dir = ".work";
}} $@;
'';

lbf-prelude-to-purescript = pkgs.writeShellScriptBin "lbf-prelude-to-purescript" ''
export LB_COMPILER=${config.packages.lbc}/bin/lbc;
mkdir autogen;
mkdir .work;
${config.overlayAttrs.lbf-nix.lbfBuild.buildCall {
files = [];
import-paths = [ config.packages.lbf-prelude ];
gen = "${config.packages.lbg-purescript}/bin/lbg-purescript";
gen-classes = ["Prelude.Eq" "Prelude.Json"];
gen-dir = "autogen";
gen-opts = ["--config=${config.packages.codegen-configs}/purescript-prelude-base.json"];
work-dir = ".work";
}} $@;
'';

lbf-plutus-to-purescript = pkgs.writeShellScriptBin "lbf-plutus-to-purescript" ''
export LB_COMPILER=${config.packages.lbc}/bin/lbc;
mkdir autogen;
mkdir .work;
${config.overlayAttrs.lbf-nix.lbfBuild.buildCall {
files = [];
import-paths = [ config.packages.lbf-prelude config.packages.lbf-plutus ];
gen = "${config.packages.lbg-purescript}/bin/lbg-purescript";
gen-classes = [ "Prelude.Eq" "Prelude.Json" "Plutus.V1.PlutusData" ];
gen-dir = "autogen";
gen-opts = [
"--config=${config.packages.codegen-configs}/purescript-prelude-base.json"
"--config=${config.packages.codegen-configs}/purescript-plutus-ctl.json"
];
work-dir = ".work";
}} $@;
'';

};

inherit (hsNixFlake) checks;
Expand Down

0 comments on commit 29e061b

Please sign in to comment.