@@ -106,27 +106,25 @@ overrideStackage stackResolver nixpkgsPath packages = vcat
106106 ]
107107
108108pPrintHaskellPackages :: OverrideConfig -> Doc
109−pPrintHaskellPackages oc =
110− let
111− nixpkgs = if oc ^. ocNixpkgs . to fromString == systemNixpkgs
112− then systemNixpkgs
113− else (disp . (fromString :: FilePath -> Nix.FilePath)) (oc ^. ocNixpkgs)
114− in vcat
109+pPrintHaskellPackages oc = vcat
115110 [ funargs
116− [ "nixpkgs ? import " <> nixpkgs <> " {}"
111+ [ "callPackage"
112+ , "pkgs"
113+ , "overrides ? (self: super: {})"
114+ , "packageSetConfig ? (sefl: super: {})"
117115 ]
118116 , ""
119− , "with nixpkgs; let"
117+ , "let"
120118 , nest 2 $ vcat
121− [ attr "haskellLib" "callPackage (nixpkgs.path + /pkgs/development/haskell-modules/lib.nix) {}"
119+ [ attr "haskellLib" "pkgs.haskell.lib"
122120 ]
123− , "in callPackage (nixpkgs.path + /pkgs/development/haskell-modules) {"
121+ , "in callPackage (<nixpkgs/pkgs/development/haskell-modules>) {"
124122 , nest 2 $ vcat
125123 [ attr "ghc" ("pkgs.haskell.compiler." <> toNixGhcVersion (oc ^. ocGhc))
126124 , attr "compilerConfig" . importStackageConfig $ oc ^. ocStackageConfig
127125 , attr "initialPackages" . importStackagePackages $ oc ^. ocStackagePackages
128126 , attr "configurationCommon" "if builtins.pathExists ./configuration-common.nix then import ./configuration-common.nix else args: self: super: {}"
129− , "inherit haskellLib;"
127+ , "inherit haskellLib overrides packageSetConfig;"
130128 ]
131129 , "}"
132130 ]