-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (50 loc) · 1.91 KB
/
Copy pathflake.nix
File metadata and controls
55 lines (50 loc) · 1.91 KB
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
52
53
54
55
{
description = "Flake for Holochain app development with customized Holochain build";
inputs = {
holonix.url = "github:holochain/holonix?ref=main";
nixpkgs.follows = "holonix/nixpkgs";
flake-parts.follows = "holonix/flake-parts";
};
outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } {
systems = builtins.attrNames inputs.holonix.devShells;
perSystem = { inputs', pkgs, ... }:
let
# Override arguments passed in to Holochain build with above feature arguments.
customHolochain = inputs'.holonix.packages.holochain.override {
# Disable default features and enable CHC and unstable sharding.
cargoExtraArgs = "--features chc,unstable-sharding";
};
# Customize the Holochain CLI build.
customHc = inputs'.holonix.packages.hc.override {
# Check whether you need to customize the Holochain CLI build because it
# might be that the default (cached) binary will work for you even when adding features to Holochain.
cargoExtraArgs = "--features chc";
};
in
{
formatter = pkgs.nixpkgs-fmt;
devShells.default = pkgs.mkShell {
packages = [
# Include custom builds of Holochain and the Holochain CLI in dev shell.
customHolochain
customHc
]
++ (with inputs'.holonix.packages; [
hcterm
bootstrap-srv
lair-keystore
hc-scaffold
hn-introspect
rust # For Rust development, with the WASM target included for zome builds
]) ++ (with pkgs; [
nodejs_24 # For UI development
binaryen # For WASM optimisation
# Add any other packages you need here
]);
shellHook = ''
export PS1='\[\033[1;34m\][holonix:\w]\$\[\033[0m\] '
'';
};
};
};
}