File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 3838 name = mkOption {
3939 type = types . str ;
4040 description = ''Name of the cabal package ("foo" if foo.cabal)'' ;
41- default = "" ;
4241 } ;
4342 root = mkOption {
4443 type = types . path ;
5453 description = ''Overrides for the Cabal project'' ;
5554 default = self : super : { } ;
5655 } ;
56+ # TODO: This option will go away after #7
5757 modifier = mkOption {
5858 type = functionTo types . package ;
5959 description = ''
159159 hlint ;
160160 } ;
161161 buildTools = lib . attrValues ( defaultBuildTools hp // cfg . buildTools hp ) ;
162- package = cfg . modifier ( hp . callCabal2nixWithOptions cfg . name cfg . root "" { } ) ;
163- devShell = with pkgs . haskell . lib ;
164- ( addBuildTools package buildTools ) . envFunc { withHoogle = true ; } ;
162+ package' = hp . callCabal2nixWithOptions cfg . name cfg . root "" { } ;
163+ package = cfg . modifier package' ;
164+ devShell = ( hp . extend ( self : super : {
165+ "${ cfg . name } " = package' ;
166+ } ) ) . shellFor {
167+ packages = p : [
168+ ( cfg . modifier p . "${ cfg . name } " )
169+ ] ;
170+ withHoogle = true ;
171+ buildInputs = buildTools ;
172+ } ;
165173 devShellCheck = name : command :
166174 runCommandInSimulatedShell devShell cfg . root "${ projectKey } -${ name } -check" { } command ;
167175 in
You can’t perform that action at this time.
0 commit comments