forked from holochain/tryorama
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
46 lines (37 loc) · 1.3 KB
/
flake.nix
File metadata and controls
46 lines (37 loc) · 1.3 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
{
inputs = {
holonix = {
url = "github:holochain/holonix?ref=main";
};
nixpkgs.follows = "holonix/nixpkgs";
# lib to build a nix package from a rust crate
crane.follows = "holonix/crane";
# Rust toolchain
rust-overlay.follows = "holonix/rust-overlay";
};
outputs = inputs@{ nixpkgs, holonix, crane, rust-overlay, ... }:
holonix.inputs.flake-parts.lib.mkFlake { inherit inputs; } {
# provide a dev shell for all systems that the holonix flake supports
systems = builtins.attrNames holonix.devShells;
perSystem = { inputs', config, system, pkgs, lib, ... }:
{
formatter = pkgs.nixpkgs-fmt;
devShells.default = pkgs.mkShell {
packages = [
# add packages from Holonix
inputs'.holonix.packages.hc
inputs'.holonix.packages.holochain
inputs'.holonix.packages.lair-keystore
inputs'.holonix.packages.rust
inputs'.holonix.packages.bootstrap-srv
# add further packages from nixpkgs
pkgs.nodejs
(lib.optional pkgs.stdenv.isDarwin pkgs.libiconv)
];
shellHook = ''
export PS1='\[\033[1;34m\][holonix:\w]\$\[\033[0m\] '
'';
};
};
};
}