-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
35 lines (33 loc) · 1.5 KB
/
default.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
{ compiler-nix-name ? "ghc8105" }:
let
# Read in the Niv sources
sources = import ./nix/sources.nix {};
# If ./nix/sources.nix file is not found run:
# niv init
# niv add input-output-hk/haskell.nix -n haskellNix
# Fetch the haskell.nix commit we have pinned with Niv
haskellNix = import sources.haskellNix { };
# If haskellNix is not found run:
# niv add input-output-hk/haskell.nix -n haskellNix
# Import nixpkgs and pass the haskell.nix provided nixpkgsArgs
pkgs = import
# haskell.nix provides access to the nixpkgs pins which are used by our CI,
# hence you will be more likely to get cache hits when using these.
# But you can also just use your own, e.g. '<nixpkgs>'.
sources.nixpkgs
# These arguments passed to nixpkgs, include some patches and also
# the haskell.nix functionality itself as an overlay.
haskellNix.nixpkgsArgs;
in pkgs.haskell-nix.cabalProject {
# 'cleanGit' cleans a source directory based on the files known by git
src = pkgs.haskell-nix.haskellLib.cleanGit {
src = ./.;
name = "haskell-hole";
};
index-state = "2021-06-30T00:00:00Z";
index-sha256 = "0f6213f13984148dbf6ad865576e3a9ebb330751b30b49a7f6e02697865cbb01";
plan-sha256 = if compiler-nix-name == "ghc8105" then "0pf8im1v15iwi0n0gksxkvrxhwgljmax92z23cwdicv2asf3da9n" else null;
materialized = if compiler-nix-name == "ghc8105" then ./nix/materialized else null;
# Specify the GHC version to use.
compiler-nix-name = compiler-nix-name;
}