@@ -1,49 +1,33 @@
2− checkMaterialization ? false, # Allows us to easily switch on materialization checking
1+{ checkMaterialization ? false # Allows us to easily switch on materialization checking
3− defaultCompilerNixName ? null, # Quick way to override the default compiler e.g. "ghc883"
2+, defaultCompilerNixName ? null # Quick way to override the default compiler e.g. "ghc883"
4− system ? builtins.currentSystem,
3+, system ? builtins.currentSystem
5− sourcesOverride ? {},
4+, sourcesOverride ? {}
6− ... }@args: rec {
5+, ... }@args: rec {
7− sources = (import ./nix/sources.nix) // sourcesOverride;
6+ sources = (import ./nix/sources.nix) // sourcesOverride;
9− config = import ./config.nix;
8+ config = import ./config.nix;
10− overlays = [ allOverlays.combined ] ++ (
9+ overlays = [ allOverlays.combined ] ++ (
11− if checkMaterialization == true
10+ if checkMaterialization == true
13− final: prev: {
12+ final: prev: {
14− haskell-nix = prev.haskell-nix // {
13+ haskell-nix = prev.haskell-nix // {
15− checkMaterialization = true;
14+ checkMaterialization = true;
21− if defaultCompilerNixName != null
20+ if defaultCompilerNixName != null
23− final: prev: {
22+ final: prev: {
24− haskell-nix = prev.haskell-nix // {
23+ haskell-nix = prev.haskell-nix // {
25− inherit defaultCompilerNixName;
24+ inherit defaultCompilerNixName;
31− allOverlays = import ./overlays args;
30+ allOverlays = import ./overlays args;
32− nixpkgsArgs = { inherit config overlays system; };
31+ nixpkgsArgs = { inherit config overlays system; };
33− pkgs = import sources.nixpkgs-default nixpkgsArgs;
32+ pkgs = import sources.nixpkgs-default nixpkgsArgs;
36− haskellNixV1 = (haskellNix {}).nixpkgsArgs;
37− haskellNixV2 = haskellNix;
39− v1DeprecationMessage = "Version 1 is deprecated: use version 2 (nixpkgs arguments are available as the `nixpkgsArgs` attribute of version 2)";
40−# If no arguments, then you get V1
41−# I'd like to make importing directly issue a warning, but I couldn't figure out a way to make it happen
43− __functor = _: { version ? 2, ... }@args:
45− then builtins.trace v1DeprecationMessage haskellNixV1
47− then haskellNixV2 args
48− else builtins.throw ("haskell.nix: unknown version: " + (builtins.toString version));