Skip to content

Commit

Permalink
wip: restore support for nix for GHC 921
Browse files Browse the repository at this point in the history
Support was broken by
#2866 where the
configuration-ghc-921 file was removed.

#2892 will indeed
restore these file and fix the build with GHC 922, but I was in need a
GHC 921 support at work.
  • Loading branch information
guibou committed May 13, 2022
1 parent 9e1738e commit 3dabe1e
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 3 deletions.
55 changes: 55 additions & 0 deletions configuration-ghc-921.nix
@@ -0,0 +1,55 @@
# nix version of cabal-ghc901.project
{ pkgs, inputs }:

let
disabledPlugins = [
"hls-brittany-plugin"
"hls-hlint-plugin"
"hls-haddock-comments-plugin"
"hls-tactics-plugin"
"hls-stylish-haskell-plugin"
"hls-class-plugin"
# That one is not technically a plugin, but by putting it in this list, we
# get it removed from the top level list of requirement and it is not pull
# in the nix shell.
"shake-bench"
];

hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
{
hlsDisabledPlugins = disabledPlugins;

fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu {};
primitive-extras = hself.primitive-extras_0_10_1_2;
ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.ghc-exactprint {};
constraints-extras = hself.callCabal2nix "constraints-extras" inputs.constraints-extras {};
retrie = hself.callCabal2nix "retrie" inputs.retrie {};

# Hlint is still broken
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint {});
hiedb = hself.hiedb_0_4_1_0;

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [
"-f-brittany"
"-f-hlint"
"-f-haddockComments"
"-f-tactics"
"-f-stylishHaskell"
"-f-class"
]) { };

# YOLO
mkDerivation = args:
hsuper.mkDerivation (args // {
jailbreak = true;
doCheck = false;
});
};
in {
inherit disabledPlugins;
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
}
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3dabe1e

Please sign in to comment.