Skip to content

Commit

Permalink
build(nix): ghc922 -> ghc923 (#3049)
Browse files Browse the repository at this point in the history
* build(nix): ghc922 -> ghc923

bumped nixpkgs and add support for ghc923 (replacing ghc922)

* fixes

* fixing for ghc90?

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
  • Loading branch information
3 people authored Jul 20, 2022
1 parent 41b1085 commit 100b53a
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 33 deletions.
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ allow-newer:
----------
hiedb:base,

ekg-core,
ekg-wai:time
7 changes: 3 additions & 4 deletions configuration-ghc-90.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ let
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };

ghc-lib = hself.ghc-lib_9_2_2_20220307;
ghc-lib-parser = hself.ghc-lib-parser_9_2_2_20220307;
ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_2_0_3;
ghc-lib-parser = hself.ghc-lib-parser_9_2_3_20220709;
ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_2_0_4;

Cabal = hself.Cabal_3_6_3_0;
ormolu = hself.ormolu_0_4_0_0;
ormolu = hself.ormolu_0_5_0_0;
fourmolu = hself.fourmolu_0_6_0_0;

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

Expand Down
2 changes: 2 additions & 0 deletions configuration-ghc-92.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ let
# Hlint is still broken
hlint = doJailbreak (hself.callCabal2nix "hlint" inputs.hlint { });

stylish-haskell = appendConfigureFlag hsuper.stylish-haskell "-fghc-lib";

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
Expand Down
42 changes: 21 additions & 21 deletions flake.lock

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

16 changes: 8 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
url = "https://hackage.haskell.org/package/ptr-poker-0.1.2.8/ptr-poker-0.1.2.8.tar.gz";
flake = false;
};
stylish-haskell-01220 = {
url = "https://hackage.haskell.org/package/stylish-haskell-0.12.2.0/stylish-haskell-0.12.2.0.tar.gz";
stylish-haskell = {
url = "https://hackage.haskell.org/package/stylish-haskell-0.14.2.0/stylish-haskell-0.14.2.0.tar.gz";
flake = false;
};
implicit-hie-cradle = {
Expand Down Expand Up @@ -213,7 +213,7 @@
};

ghc902Config = (import ./configuration-ghc-90.nix) { inherit pkgs inputs; };
ghc922Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; };
ghc923Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; };

# GHC versions
# While HLS still works fine with 8.10 GHCs, we only support the versions that are cached
Expand All @@ -222,12 +222,12 @@
ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version);
cases = {
ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902");
ghc922 = ghc922Config.tweakHpkgs (pkgs.hlsHpkgs "ghc922");
ghc923 = ghc923Config.tweakHpkgs (pkgs.hlsHpkgs "ghc923");
};
in { default = cases."${ghcVersion}"; } // cases;

ghc902 = supportedGHCs.ghc902;
ghc922 = supportedGHCs.ghc922;
ghc923 = supportedGHCs.ghc923;
ghcDefault = supportedGHCs.default;

# For markdown support
Expand Down Expand Up @@ -359,20 +359,20 @@
simpleDevShells = {
haskell-language-server-dev = mkDevShell ghcDefault "cabal.project";
haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project";
haskell-language-server-922-dev = mkDevShell ghc922 "cabal.project";
haskell-language-server-923-dev = mkDevShell ghc923 "cabal.project";
};

# Developement shell, haskell packages are also provided by nix
nixDevShells = {
haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project";
haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project";
haskell-language-server-922-dev-nix = mkDevShellWithNixDeps ghc922 "cabal.project";
haskell-language-server-923-dev-nix = mkDevShellWithNixDeps ghc923 "cabal.project";
};

allPackages = {
haskell-language-server = mkExe ghcDefault;
haskell-language-server-902 = mkExe ghc902;
haskell-language-server-922 = mkExe ghc922;
haskell-language-server-923 = mkExe ghc923;
};

devShells = simpleDevShells // nixDevShells // {
Expand Down

0 comments on commit 100b53a

Please sign in to comment.