@@ -68,12 +68,15 @@ in { haskell-nix = prev.haskell-nix // {
68 tools = lib.mapAttrs final.haskell-nix.tool;
68 tools = lib.mapAttrs final.haskell-nix.tool;
70 # Like `tools` but allows default ghc to be specified
70 # Like `tools` but allows default ghc to be specified
71− toolsForGhc = ghc: toolSet:
71+ toolsForGhc = ghcOverride: toolSet:
72 final.haskell-nix.tools (
72 final.haskell-nix.tools (
73 lib.mapAttrs (name: versionOrArgs:
73 lib.mapAttrs (name: versionOrArgs:
74+ let args = final.haskell-nix.haskellLib.versionOrArgsToArgs versionOrArgs;
74− # Add default ghc if not specified in the args
76+ # Add default ghc if not specified in the args
77+ (lib.optionalAttrs (!(args ? "compiler-nix-name" || args ? "ghc"))
75− { inherit ghc; }
78+ { inherit ghcOverride; }
76− // final.haskell-nix.haskellLib.versionOrArgsToArgs versionOrArgs
79+ ) // args