-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
80 lines (70 loc) · 2.5 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
{
description = "plutarch-template";
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";
cores = "1";
max-jobs = "auto";
auto-optimise-store = "true";
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
haskell-nix.url = "github:input-output-hk/haskell.nix";
iohk-nix.url = "github:input-output-hk/iohk-nix";
iohk-nix.inputs.nixpkgs.follows = "haskell-nix/nixpkgs";
CHaP.url = "github:intersectmbo/cardano-haskell-packages?ref=repo";
CHaP.flake = false;
plutarch.url = "github:plutonomicon/plutarch-plutus?ref=gh-pages";
plutarch.flake = false;
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
# This is for CI, for users who does not use Hercules CI, this input
# along with ./nix/hercules-ci.nix can be removed.
hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects";
};
outputs = inputs@{ flake-parts, nixpkgs, haskell-nix, iohk-nix, CHaP, plutarch, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
./nix/pre-commit.nix
./nix/hercules-ci.nix
];
debug = true;
systems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];
perSystem = { config, system, ... }:
let
pkgs =
import haskell-nix.inputs.nixpkgs {
inherit system;
overlays = [
haskell-nix.overlay
iohk-nix.overlays.crypto
iohk-nix.overlays.haskell-nix-crypto
];
inherit (haskell-nix) config;
};
project = pkgs.haskell-nix.cabalProject' {
src = ./.;
compiler-nix-name = "ghc966";
index-state = "2024-10-09T22:38:57Z";
inputMap = {
"https://chap.intersectmbo.org/" = CHaP;
"https://plutonomicon.github.io/plutarch-plutus/" = plutarch;
};
shell = {
shellHook = config.pre-commit.installationScript;
withHoogle = true;
withHaddock = true;
exactDeps = false;
tools = {
cabal = { };
};
};
};
flake = project.flake { };
in
{
inherit (flake) devShells packages checks;
};
};
}