@@ -82,6 +82,23 @@ let
82 modules = [ ghcHackagePatches.${compiler.nix-name} ] ++ modules;
82 modules = [ ghcHackagePatches.${compiler.nix-name} ] ++ modules;
85+ # Create a Haskell package set based on a Cabal configuration.
86+ mkCabalProjectPkgSet =
87+ { plan-pkgs # Path to the output of plan-to-nix
88+ , pkg-def-overlays ? []
93+ pkg-def = plan-pkgs.pkgs;
94+ # The compiler referenced in the stack config
95+ compiler = (plan-pkgs.overlay hackage).compiler or (pkg-def hackage).compiler;
98+ pkg-def-overlays = [ plan-pkgs.overlay ] ++ pkg-def-overlays;
99+ modules = [ ghcHackagePatches.${compiler.nix-name} ] ++ modules;
85 # Programs for generating Nix expressions from Cabal and Stack
102 # Programs for generating Nix expressions from Cabal and Stack
87 nix-tools = self.callPackage ./nix-tools {
104 nix-tools = self.callPackage ./nix-tools {