This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
69 lines (69 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
{
inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
outputs = { self, nixpkgs, flake-utils, flake-compat, haskellNix }:
let
supportedSystems = [
"x86_64-linux"
];
in
flake-utils.lib.eachSystem supportedSystems (system:
let
overlays =
[ haskellNix.overlay
(final: prev: {
hixProject =
final.haskell-nix.project {
src = ./.;
compiler-nix-name = "ghc90";
evalSystem = "x86_64-linux";
};
}
)
];
pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
flake = pkgs.hixProject.flake {};
in flake // rec
{ legacyPackages = pkgs;
packages =
{
lib = flake.packages."snarkl:lib:snarkl";
print = flake.packages."snarkl:exe:print-examples";
benchmarks = flake.packages."snarkl:bench:criterion";
# tutorial = flake.packages."tutorial:exe:sudoku";
all = pkgs.symlinkJoin {
name = "all";
paths = with packages;
[ lib
print
benchmarks
# tutorial
];
};
default = packages.all;
};
devShells =
{ default =
pkgs.hixProject.shellFor {
tools = {
cabal = {};
haskell-language-server = "2.4.0.0";
};
buildInputs = with pkgs; [
haskellPackages.ormolu_0_5_2_0
haskellPackages.cabal-fmt
haskellPackages.hspec-discover
haskellPackages.graphmod
haskellPackages.hlint
haskellPackages.markdown-unlit
];
};
};
}
);
nixConfig = {
allow-import-from-derivation = true;
};
}