Skip to content
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

Make nix ghc927 buildable #3555

Merged
merged 6 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions configuration-ghc-90.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ let

ormolu = hself.callCabal2nix "ormolu" inputs.ormolu-052 {};

fourmolu = hself.callHackage "fourmolu" "0.10.1.0" {};

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
Expand Down
4 changes: 4 additions & 0 deletions configuration-ghc-92.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ let

ormolu = hself.callCabal2nix "ormolu" inputs.ormolu-052 {};

fourmolu = hself.callHackage "fourmolu" "0.10.1.0" {};

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

hie-bios = hself.callCabal2nix "hie-bios" inputs.haskell-hie-bios { };

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
Expand Down
6 changes: 0 additions & 6 deletions configuration-ghc-94.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ let
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
apply-refact = hsuper.apply-refact_0_12_0_0;

# ptr-poker breaks on MacOS without SSE2 optimizations
# https://github.com/nikita-volkov/ptr-poker/issues/11
ptr-poker = hself.callCabal2nix "ptr-poker" inputs.ptr-poker { };

ormolu = hself.ormolu_0_5_3_0;

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

# Re-generate HLS drv excluding some plugins
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

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

25 changes: 8 additions & 17 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,6 @@
then overrideCabal hsuper.ormolu (_: { enableSeparateBinOutput = false; })
else hsuper.ormolu;

# Due to the following issue, fixity-th should be disabled, especially for darwin.
# https://github.com/fourmolu/fourmolu/issues/238
# nixpkgs now disables fixity-th for ghc944.
fourmolu =
addBuildDepend
(appendConfigureFlag hself.fourmolu_0_10_1_0 "-f-fixity-th")
hself.file-embed;

stylish-haskell = hself.callCabal2nix "stylish-haskell" inputs.stylish-haskell {};
};

Expand Down Expand Up @@ -191,7 +183,7 @@
};

ghc902Config = (import ./configuration-ghc-90.nix) { inherit pkgs inputs; };
ghc926Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; };
ghc927Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; };
ghc944Config = (import ./configuration-ghc-94.nix) { inherit pkgs inputs; };
ghc961Config = (import ./configuration-ghc-96.nix) { inherit pkgs inputs; };

Expand All @@ -202,14 +194,14 @@
ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version);
cases = {
ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902");
ghc926 = ghc926Config.tweakHpkgs (pkgs.hlsHpkgs "ghc926");
ghc927 = ghc927Config.tweakHpkgs (pkgs.hlsHpkgs "ghc927");
ghc944 = ghc944Config.tweakHpkgs (pkgs.hlsHpkgs "ghc944");
ghc961 = ghc961Config.tweakHpkgs (pkgs.hlsHpkgs "ghc961");
};
in { default = cases."${ghcVersion}"; } // cases;

ghc902 = supportedGHCs.ghc902;
ghc926 = supportedGHCs.ghc926;
ghc927 = supportedGHCs.ghc927;
ghc944 = supportedGHCs.ghc944;
ghc961 = supportedGHCs.ghc961;
ghcDefault = supportedGHCs.default;
Expand Down Expand Up @@ -240,9 +232,8 @@
buildInputs = [
# our compiling toolchain
hpkgs.ghc
pkgs.cabal-install
# @guibou: I'm not sure hie-bios is needed
pkgs.haskellPackages.hie-bios
# pkgs.haskellPackages.hie-bios
guibou marked this conversation as resolved.
Show resolved Hide resolved
# Dependencies needed to build some parts of hackage
gmp zlib ncurses
# Changelog tooling
Expand Down Expand Up @@ -332,7 +323,7 @@
simpleDevShells = {
haskell-language-server-dev = mkDevShell ghcDefault "cabal.project";
haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project";
haskell-language-server-926-dev = mkDevShell ghc926 "cabal.project";
haskell-language-server-927-dev = mkDevShell ghc927 "cabal.project";
haskell-language-server-944-dev = mkDevShell ghc944 "cabal.project";
haskell-language-server-961-dev = mkDevShell ghc961 "cabal.project";
};
Expand All @@ -341,7 +332,7 @@
nixDevShells = {
haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project";
haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project";
haskell-language-server-926-dev-nix = mkDevShellWithNixDeps ghc926 "cabal.project";
haskell-language-server-927-dev-nix = mkDevShellWithNixDeps ghc927 "cabal.project";
haskell-language-server-944-dev-nix = mkDevShellWithNixDeps ghc944 "cabal.project";
haskell-language-server-961-dev-nix = mkDevShellWithNixDeps ghc961 "cabal.project";
};
Expand All @@ -351,15 +342,15 @@
envShells = {
haskell-language-server-dev-env = mkEnvShell ghcDefault;
haskell-language-server-902-dev-env = mkEnvShell ghc902;
haskell-language-server-926-dev-env = mkEnvShell ghc926;
haskell-language-server-927-dev-env = mkEnvShell ghc927;
haskell-language-server-944-dev-env = mkEnvShell ghc944;
haskell-language-server-961-dev-env = mkEnvShell ghc961;
};

allPackages = {
haskell-language-server = mkExe ghcDefault;
haskell-language-server-902 = mkExe ghc902;
haskell-language-server-926 = mkExe ghc926;
haskell-language-server-927 = mkExe ghc927;
haskell-language-server-944 = mkExe ghc944;
haskell-language-server-961 = mkExe ghc961;
};
Expand Down