-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.nix
51 lines (41 loc) · 1.61 KB
/
build.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ inputs, ... }:
{
perSystem = { config, system, pkgs, inputs', ... }:
let
hsFlake = inputs.flake-lang.lib."${system}".haskellPlutusFlake {
src = ./.;
name = "demo-plutustx";
inherit (config.settings.haskell) index-state compiler-nix-name;
dependencies = [
# LB base schema and runtimes libs
# PlutusTx
"${inputs'.lbf.packages.lbf-plutus-plutustx}"
"${inputs'.lbf.packages.lbr-plutustx-src}"
# Prelude
"${inputs'.lbf.packages.lbf-prelude-haskell}"
"${inputs'.lbf.packages.lbf-prelude-plutustx}"
"${inputs'.lbf.packages.lbr-prelude-haskell-src}"
# Demo API
"${config.packages.lbf-demo-config-api-haskell}"
"${config.packages.lbf-demo-plutus-api-plutustx}"
];
devShellTools = config.settings.shell.tools;
devShellHook = config.settings.shell.hook;
};
in
{
devShells.dev-demo-plutustx = hsFlake.devShell;
packages = {
# WARN(bladyjoker): We have to pick the hsFlake.packages like this otherwise flake-parts goes into `infinite recursion`.
demo-plutustx-lib = hsFlake.packages."demo-plutustx:lib:demo-plutustx";
demo-plutustx-cli = hsFlake.packages."demo-plutustx:exe:demo-plutustx-cli";
demo-plutustx-config = pkgs.stdenv.mkDerivation {
name = "demo-plutustx-config";
src = ./.;
buildPhase = ''${config.packages.demo-plutustx-cli}/bin/demo-plutustx-cli compile'';
installPhase = "cp demo-config.json $out";
};
};
inherit (hsFlake) checks;
};
}