File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 82
82
modules = [ ghcHackagePatches . ${ compiler . nix-name } ] ++ modules ;
83
83
} ;
84
84
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 ? [ ]
89
+ , modules ? [ ]
90
+ } @args :
91
+
92
+ let
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 ;
96
+ in self . mkPkgSet {
97
+ inherit pkg-def ;
98
+ pkg-def-overlays = [ plan-pkgs . overlay ] ++ pkg-def-overlays ;
99
+ modules = [ ghcHackagePatches . ${ compiler . nix-name } ] ++ modules ;
100
+ } ;
101
+
85
102
# Programs for generating Nix expressions from Cabal and Stack
86
103
# files.
87
104
nix-tools = self . callPackage ./nix-tools {
You can’t perform that action at this time.
0 commit comments