Skip to content

nix: add support for ghc 9.0.1 #1995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jul 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Avoid removing attrs of hpkgs
  • Loading branch information
berberman committed Jul 2, 2021
commit 66362b5f2b151519f0ac00f4d2520ce7a4f51e84
25 changes: 14 additions & 11 deletions configuration-ghc-901.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
{ pkgs }:

let
removePluginPackages = hpkgs:
removeAttrs hpkgs [
"hls-tactics-plugin"
"hls-brittany-plugin"
"hls-stylish-haskell-plugin"
"hls-fourmolu-plugin"
"hls-splice-plugin"
"hls-ormolu-plugin"
"hls-eval-plugin"
];
disabledPlugins = [
"hls-tactics-plugin"
"hls-brittany-plugin"
"hls-stylish-haskell-plugin"
"hls-fourmolu-plugin"
"hls-splice-plugin"
"hls-ormolu-plugin"
"hls-eval-plugin"
];

hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
let
Expand Down Expand Up @@ -98,4 +98,7 @@ let
"-f-tactic"
]) { };
};
in { tweakHpkgs = hpkgs: removePluginPackages (hpkgs.extend hpkgsOverride); }
in {
inherit disabledPlugins;
tweakHpkgs = hpkgs: hpkgs.extend hpkgsOverride;
}
13 changes: 6 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,12 @@
hpkgs.shellFor {
doBenchmark = true;
packages = p:
with lib;
# we can remove sources attrs from hpkgs to exclude HLS plugins,
# so hpkgs may not be the superset of hlsSources
pipe (attrNames hlsSources) [
(xs: map (name: if hpkgs ? name then p.${name} else null) xs)
(xs: remove null xs)
];
with builtins;
map (name: p.${name}) (attrNames
(if hpkgs.ghc.version == "9.0.1" then
removeAttrs hlsSources ghc901Config.disabledPlugins
else
hlsSources));
buildInputs = [ gmp zlib ncurses capstone tracy (gen-hls-changelogs hpkgs) ]
++ (with hpkgs; [
cabal-install
Expand Down