forked from superfluid-finance/protocol-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
91 lines (89 loc) · 2.37 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
83
84
85
86
87
88
89
90
91
{
description = "Overlay for working with Superfluid protocol monorepo";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flakeUtils.url = "github:numtide/flake-utils";
foundry.url = "github:shazow/foundry.nix/monthly";
};
outputs = { self, nixpkgs, flakeUtils, foundry } :
flakeUtils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
# minimem development shell
minimumEVMDevInputs = with pkgs; [
# for nodejs ecosystem
yarn
nodejs-16_x
# for solidity development
foundry.defaultPackage.${system}
];
# additional tooling for whitehat hackers
whitehatInputs = with pkgs; [
slither-analyzer
echidna
];
# for developing specification
ghcVer = "ghc944";
ghc = pkgs.haskell.compiler.${ghcVer};
ghcPackages = pkgs.haskell.packages.${ghcVer};
specInputs = with pkgs; [
# for nodejs ecosystem
yarn
gnumake
nodePackages.nodemon
# for haskell spec
cabal-install
ghc
ghcPackages.haskell-language-server
hlint
stylish-haskell
# sage math
sage
# testing tooling
gnuplot
# yellowpaper pipeline tooling
ghcPackages.lhs2tex
python39Packages.pygments
(texlive.combine {
inherit (texlive)
scheme-basic metafont
collection-latex collection-latexextra
collection-bibtexextra collection-mathscience
collection-fontsrecommended collection-fontsextra;
})
];
ci-spec = ghcVer : with pkgs; mkShell {
buildInputs = [
gnumake
cabal-install
haskell.compiler.${ghcVer}
hlint
];
};
in {
devShells.default = with pkgs; mkShell {
buildInputs = minimumEVMDevInputs;
};
devShells.whitehat = with pkgs; mkShell {
buildInputs = minimumEVMDevInputs
++ whitehatInputs;
};
devShells.spec = with pkgs; mkShell {
buildInputs = minimumEVMDevInputs
++ specInputs;
};
devShells.full = with pkgs; mkShell {
buildInputs = minimumEVMDevInputs
++ whitehatInputs
++ specInputs;
};
devShells.ci-spec-ghc925 = ci-spec "ghc925";
devShells.ci-spec-ghc944 = ci-spec "ghc944";
devShells.ci-hot-fuzz = with pkgs; mkShell {
buildInputs = [
slither-analyzer
echidna
];
};
});
}