git.iko.soy/typeable/stackage2nix
on master help sign in
Upd remove nixpkgs arg when generate from resolver
e6a68bdDmitry Bushev
src/Distribution/Nixpkgs/Haskell/Stack/PrettyPrinting.hs+9−11
@@ -106,27 +106,25 @@ overrideStackage stackResolver nixpkgsPath packages = vcat
106 ]
106 ]
107
107
108pPrintHaskellPackages :: OverrideConfig -> Doc
108pPrintHaskellPackages :: OverrideConfig -> Doc
109−pPrintHaskellPackages oc =
109+pPrintHaskellPackages oc = vcat
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
115 [ funargs
110 [ funargs
116− [ "nixpkgs ? import " <> nixpkgs <> " {}"
111+ [ "callPackage"
112+ , "pkgs"
113+ , "overrides ? (self: super: {})"
114+ , "packageSetConfig ? (sefl: super: {})"
117 ]
115 ]
118 , ""
116 , ""
119− , "with nixpkgs; let"
117+ , "let"
120 , nest 2 $ vcat
118 , nest 2 $ vcat
121− [ attr "haskellLib" "callPackage (nixpkgs.path + /pkgs/development/haskell-modules/lib.nix) {}"
119+ [ attr "haskellLib" "pkgs.haskell.lib"
122 ]
120 ]
123− , "in callPackage (nixpkgs.path + /pkgs/development/haskell-modules) {"
121+ , "in callPackage (<nixpkgs/pkgs/development/haskell-modules>) {"
124 , nest 2 $ vcat
122 , nest 2 $ vcat
125 [ attr "ghc" ("pkgs.haskell.compiler." <> toNixGhcVersion (oc ^. ocGhc))
123 [ attr "ghc" ("pkgs.haskell.compiler." <> toNixGhcVersion (oc ^. ocGhc))
126 , attr "compilerConfig" . importStackageConfig $ oc ^. ocStackageConfig
124 , attr "compilerConfig" . importStackageConfig $ oc ^. ocStackageConfig
127 , attr "initialPackages" . importStackagePackages $ oc ^. ocStackagePackages
125 , attr "initialPackages" . importStackagePackages $ oc ^. ocStackagePackages
128 , attr "configurationCommon" "if builtins.pathExists ./configuration-common.nix then import ./configuration-common.nix else args: self: super: {}"
126 , 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;"
130 ]
128 ]
131 , "}"
129 , "}"
132 ]
130 ]