mateamt/default.nix

31 lines
1.2 KiB
Nix
Raw Normal View History

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
2021-02-01 01:25:52 +00:00
# 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
2021-02-01 01:25:52 +00:00
# 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>'.
haskellNix.sources.nixpkgs-2009
# These arguments passed to nixpkgs, include some patches and also
# the haskell.nix functionality itself as an overlay.
haskellNix.nixpkgsArgs;
in pkgs.haskell-nix.project {
2021-02-01 01:25:52 +00:00
# 'cleanGit' cleans a source directory based on the files known by git
src = pkgs.haskell-nix.haskellLib.cleanGit {
name = "haskell-nix-project";
2021-02-01 01:25:52 +00:00
src = ./.;
};
# Specify the GHC version to use.
2021-02-15 18:00:43 +00:00
compiler-nix-name = "ghc8104"; # Not required for `stack.yaml` based projects.
2020-07-31 21:07:05 +00:00
}