forked from holochain/holochain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
82 lines (69 loc) · 2.49 KB
/
flake.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
description =
"Holochain is an open-source framework to develop peer-to-peer applications with high levels of security, reliability, and performance.";
inputs = {
# empty repo that can be detected as such, used for the input override implementation
empty.url = "github:steveej/empty";
empty.flake = false;
# nix packages pointing to the github repo
nixpkgs.url = "nixpkgs/nixos-unstable";
# lib to build nix packages from rust crates
crate2nix = {
url = "github:kolloch/crate2nix";
flake = false;
};
# lib to build nix packages from rust crates
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
# filter out all .nix files to not affect the input hash
# when these are changes
nix-filter.url = "github:numtide/nix-filter";
# provide downward compatibility for nix-shell/derivation users
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
# To execute checks when making a commit
# Only /flake-module.nix is needed here -> Importing with `flake=false`.
pre-commit-hooks-nix.url = "github:cachix/pre-commit-hooks.nix";
pre-commit-hooks-nix.flake = false;
# rustup, rust and cargo
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
versions.url = "github:holochain/holochain?dir=versions/0_1";
holochain.follows = "empty";
lair.follows = "empty";
launcher.follows = "empty";
scaffolding.follows = "empty";
cargo-chef = {
url = "github:LukeMathWalker/cargo-chef/main";
flake = false;
};
cargo-rdme = {
url = "github:orium/cargo-rdme/v1.1.0";
flake = false;
};
};
# refer to flake-parts docs https://flake.parts/
outputs = inputs @ { self, nixpkgs, flake-parts, ... }:
# all possible parameters for a module: https://flake.parts/module-arguments.html#top-level-module-arguments
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "aarch64-darwin" "x86_64-linux" "x86_64-darwin" "aarch64-linux" ];
imports =
# auto import all nix code from `./modules`, treat each one as a flake and merge them
(
map (m: "${./.}/nix/modules/${m}")
(builtins.attrNames (builtins.readDir ./nix/modules))
)
++ [
(inputs.pre-commit-hooks-nix + /flake-module.nix)
];
perSystem = { pkgs, ... }: {
legacyPackages = pkgs;
};
};
}