Created
September 6, 2020 13:48
-
-
Save typetetris/515043af893bf25748c533cbce76d38a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
hackage = ../hackage.nix; | |
stackage = ../stackage.nix; | |
nix-tools = ../nix-tools; | |
in | |
{ # Fetch the latest haskell.nix and import its default.nix | |
haskellNix ? import ../haskell.nix { | |
sourcesOverride = { | |
hackage = hackage; | |
stackage = stackage; | |
nix-tools = nix-tools; | |
}; | |
} | |
# 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>'. | |
, nixpkgsSrc ? haskellNix.sources.nixpkgs-2003 | |
# haskell.nix provides some arguments to be passed to nixpkgs, including some | |
# patches and also the haskell.nix functionality itself as an overlay. | |
, nixpkgsArgs ? haskellNix.nixpkgsArgs | |
# import nixpkgs with overlays | |
, pkgs ? import nixpkgsSrc nixpkgsArgs | |
}: let | |
project = pkgs.haskell-nix.project { | |
# 'cleanGit' cleans a source directory based on the files known by git | |
src = pkgs.haskell-nix.haskellLib.cleanGit { | |
name = "haskell-language-server"; | |
src = ./.; | |
}; | |
# For `cabal.project` based projects specify the GHC version to use. | |
compiler-nix-name = "ghc8102"; # Not used for `stack.yaml` based projects. | |
projectFileName = "cabal.project"; | |
doExactConfig = true; | |
modules = [ | |
{ | |
packages.diagrams-svg.components.library.doExactConfig = true; | |
} | |
]; | |
}; | |
hsPkgs = project.hsPkgs; | |
in project |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment