55 # Easier than importing nixpkgs just for this
66 mapAttrsToList = f : attrs :
77 map ( name : f name attrs . ${ name } ) ( __attrNames attrs ) ;
8- in [ (
9- { config , lib , pkgs , ...} :
8+ in [
9+ ( { config , lib , pkgs , ...} :
1010 { _file = "haskell.nix/overlays/hackage-quirks.nix#cabal-install" ; } //
1111 # FIXME: this is required to build cabal-install 3.2 with ghc 8.6,
1212 # but also for
@@ -23,25 +23,34 @@ in [(
2323 packages . cabal-install . src = pkgs . buildPackages . haskell-nix . sources . cabal-32 + "/cabal-install" ;
2424 } )
2525 ] ;
26- } ) ]
26+ }
27+ )
28+
29+ # TODO remove this when `dependent-sum-0.7.1.0` constraint on `some` has been updated.
30+ # See https://github.com/haskell/haskell-language-server/issues/2969
31+ # and https://github.com/obsidiansystems/dependent-sum/issues/71
32+ ( { config , lib , pkgs , ...} :
33+ { _file = "haskell.nix/overlays/hackage-quirks.nix#haskell-language-server" ; } //
34+ lib . mkIf ( config . name == "haskell-language-server" ) {
35+ cabalProject = lib . mkDefault ( ''
36+ packages: .
37+ constraints: dependent-sum >=0.7.1.0
38+ ''
39+ # TODO Remove this flag once the hls-haddock-comments-plugin is updated in hackage to work with ghc 9.2
40+ + lib . optionalString ( __elem config . compiler-nix-name [ "ghc921" "ghc922" "ghc923" "ghc924" ] ) ''
41+ package haskell-language-server
42+ flags: -haddockcomments
43+ '' ) ;
44+ }
45+ )
2746
2847 # Map the following into modules that use `mkIf` to check the name of the
2948 # hackage package in a way that is lazy enought not to cause infinite recursion
3049 # issues.
31- ++ mapAttrsToList ( n : v : { config , lib , ...} :
50+ ] ++ mapAttrsToList ( n : v : { config , lib , ...} :
3251 { _file = "haskell.nix/overlays/hackage-quirks.nix#${ n } " ; } //
3352 lib . mkIf ( n == config . name ) v ) {
3453
35- # TODO remove this when `dependent-sum-0.7.1.0` constraint on `some` has been updated.
36- # See https://github.com/haskell/haskell-language-server/issues/2969
37- # and https://github.com/obsidiansystems/dependent-sum/issues/71
38- haskell-language-server = {
39- cabalProject = ''
40- packages: .
41- constraints: dependent-sum >=0.7.1.0
42- '' ;
43- } ;
44-
4554 lsp-test = {
4655 cabalProject = ''
4756 packages: .
0 commit comments