-
Notifications
You must be signed in to change notification settings - Fork 23
/
flake.nix
93 lines (91 loc) · 2.64 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
92
93
{
nixConfig = {
extra-substituters = [
"https://cache.iog.io"
];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
allow-import-from-derivation = true;
};
inputs = {
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
haskellNix = {
url = "github:input-output-hk/haskell.nix";
inputs.hackage.follows = "hackageNix";
};
hackageNix = {
url = "github:input-output-hk/hackage.nix";
flake = false;
};
CHaP = {
url = "github:intersectmbo/cardano-haskell-packages?ref=repo";
flake = false;
};
iohkNix = {
url = "github:input-output-hk/iohk-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-compat = {
url = "github:nix-community/flake-compat";
flake = false;
};
agda-nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# for cabal-docspec
cabal-extras = {
url = "github:phadej/cabal-extras/cabal-docspec-0.0.0.20240703";
flake = false;
};
gentle-introduction = {
url = "github:phadej/gentle-introduction";
flake = false;
};
};
outputs = inputs:
let
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
#"aarch64-linux"
"aarch64-darwin"
];
in
inputs.flake-utils.lib.eachSystem supportedSystems (
system:
let
pkgs = import inputs.nixpkgs {
inherit system;
inherit (inputs.haskellNix) config;
overlays = [
inputs.iohkNix.overlays.crypto
inputs.haskellNix.overlay
inputs.iohkNix.overlays.haskell-nix-crypto
inputs.iohkNix.overlays.haskell-nix-extra
(import ./nix/tools.nix inputs)
(import ./nix/haskell.nix inputs)
(import ./nix/agda.nix inputs)
(import ./nix/pdfs.nix inputs)
];
};
hydraJobs = import ./nix/ci.nix { inherit inputs pkgs; };
in
{
devShells = rec {
default = ghc96;
ghc96 = hydraJobs.native.haskell96.devShell;
ghc96-profiled = hydraJobs.native.haskell96.devShellProfiled;
ghc910 = hydraJobs.native.haskell910.devShell;
ghc910-profiled = hydraJobs.native.haskell910.devShellProfiled;
agda-spec = pkgs.agda-spec.shell;
website = pkgs.mkShell {
packages = [ pkgs.nodejs pkgs.yarn ];
};
};
inherit hydraJobs;
legacyPackages = pkgs;
packages =
hydraJobs.native.haskell96.exesNoAsserts.ouroboros-consensus-cardano;
}
);
}