|
| 1 | +# nix version of cabal-ghc901.project |
| 2 | +{ pkgs, inputs }: |
| 3 | + |
| 4 | +let |
| 5 | + disabledPlugins = [ |
| 6 | + "hls-brittany-plugin" |
| 7 | + "hls-hlint-plugin" |
| 8 | + "hls-stylish-haskell-plugin" |
| 9 | + "hls-haddock-comments-plugin" |
| 10 | + "hls-tactics-plugin" |
| 11 | + # That one is not technically a plugin, but by putting it in this list, we |
| 12 | + # get it removed from the top level list of requirement and it is not pull |
| 13 | + # in the nix shell. |
| 14 | + "shake-bench" |
| 15 | + ]; |
| 16 | + |
| 17 | + hpkgsOverride = hself: hsuper: |
| 18 | + with pkgs.haskell.lib; { |
| 19 | + hlsDisabledPlugins = disabledPlugins; |
| 20 | + |
| 21 | + ghc-lib = hself.ghc-lib_8_10_7_20220219; |
| 22 | + ghc-lib-parser = hself.ghc-lib-parser_8_10_7_20220219; |
| 23 | + |
| 24 | + fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-0300 { }; |
| 25 | + |
| 26 | + stylish-haskell = hself.callCabal2nixWithOptions "stylish-haskell" |
| 27 | + inputs.stylish-haskell-01220 (pkgs.lib.concatStringsSep " " [ ]) { }; |
| 28 | + |
| 29 | + aeson = hself.callCabal2nixWithOptions "aeson" inputs.aeson-1520 |
| 30 | + (pkgs.lib.concatStringsSep " " [ ]) { }; |
| 31 | + |
| 32 | + brittany = hself.callCabal2nixWithOptions "brittany" inputs.brittany-01312 |
| 33 | + (pkgs.lib.concatStringsSep " " [ ]) { }; |
| 34 | + |
| 35 | + hls-hlint-plugin = hself.callCabal2nixWithOptions "hls-hlint-plugin" |
| 36 | + ./plugins/hls-hlint-plugin |
| 37 | + (pkgs.lib.concatStringsSep " " [ "-f-hlint34" "-fhyphenation" ]) { }; |
| 38 | + |
| 39 | + # Re-generate HLS drv excluding some plugins |
| 40 | + haskell-language-server = |
| 41 | + hself.callCabal2nixWithOptions "haskell-language-server" ./. |
| 42 | + (pkgs.lib.concatStringsSep " " [ |
| 43 | + "-fpedantic" |
| 44 | + "-f-hlint" |
| 45 | + "-f-fourmolu" |
| 46 | + "-f-ormolu" |
| 47 | + ]) { }; |
| 48 | + |
| 49 | + # YOLO |
| 50 | + mkDerivation = args: |
| 51 | + hsuper.mkDerivation (args // { |
| 52 | + jailbreak = true; |
| 53 | + doCheck = false; |
| 54 | + }); |
| 55 | + }; |
| 56 | +in { |
| 57 | + inherit disabledPlugins; |
| 58 | + tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride; |
| 59 | +} |
0 commit comments