Skip to content

update flakes to compile with ghc928 and ghc962 #3641

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 5 commits into from
Jun 14, 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
4 changes: 3 additions & 1 deletion configuration-ghc-92.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let
doCheck = false;
});
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
apply-refact = hsuper.apply-refact_0_12_0_0;
apply-refact = hsuper.apply-refact_0_13_0_0;

# ptr-poker breaks on MacOS without SSE2 optimizations
# https://github.com/nikita-volkov/ptr-poker/issues/11
Expand All @@ -39,6 +39,8 @@ let

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

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

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
Expand Down
2 changes: 1 addition & 1 deletion configuration-ghc-94.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let
{
hlsDisabledPlugins = disabledPlugins;
} // (builtins.mapAttrs (_: drv: disableLibraryProfiling drv) {
apply-refact = hsuper.apply-refact_0_12_0_0;
apply-refact = hsuper.apply-refact_0_13_0_0;

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

Expand Down
12 changes: 10 additions & 2 deletions configuration-ghc-96.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,29 @@ let
broken = false;
doCheck = false;
});
apply-refact = hsuper.apply-refact_0_12_0_0;
apply-refact = hsuper.apply-refact_0_13_0_0;
tagged = hself.callHackage "tagged" "0.8.7" { };
primitive = hself.callHackage "primitive" "0.8.0.0" { };
unix-compat = hself.callCabal2nix "unix-compat" inputs.haskell-unix-compat { };
MonadRandom = hself.callHackage "MonadRandom" "0.6" { };
hiedb = hself.callCabal2nix "hiedb" inputs.haskell-hiedb { };
hie-bios = hself.callCabal2nix "hie-bios" inputs.haskell-hie-bios { };
implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.haskell-implicit-hie-cradle { };
ghc-exactprint = hself.callCabal2nix "ghc-exactprint" inputs.haskell-ghc-exactprint { };

# 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;
fourmolu = hself.callCabal2nix "fourmolu" inputs.fourmolu-012 { };

# TODO: smunix: nix fails to build fourmolu-0.13 from Hackage with these errors:
# tar: */fourmolu/0.13.0.0/fourmolu.json: Not found in archive
# tar: */fourmolu/0.13.0.0/fourmolu.cabal: Not found in archive
# tar: Exiting with failure status due to previous errors
# As an alternative, we could build directly from github:fourmolu. How do people
# feel about this?
fourmolu = hself.callHackage "fourmolu" "0.12.0.0" {};

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

Expand Down
71 changes: 47 additions & 24 deletions flake.lock

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

16 changes: 13 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
};

haskell-hie-bios = {
url = "github:mpickering/hie-bios";
url = "github:haskell/hie-bios";
flake = false;
};

Expand All @@ -60,8 +60,18 @@
flake = false;
};

fourmolu-012 = {
url = "https://hackage.haskell.org/package/fourmolu-0.12.0.0/fourmolu-0.12.0.0.tar.gz";
# smunix: github:haskell/hie-bios defines
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a more detailed explanation of the reasons why I had to patch implicit-hie-cradle

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PRs welcome on implicit-hie* repos. Saddly I don't have much time for Haskell these days. If your 0.5 branch is ready make a PR and I'll publish that to hackage tomorrow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will give it another week; we may need to coordinate with a separate PR for a new version of HLS. That effort is still ongoing

# 'CabalType :: Maybe String -> Maybe FilePath -> CabalType'
# while the original githcom:Avi-D-coder/hie-bios still has this:
# 'CabalType :: Maybe String -> CabalType'
# We need a patched version of implicit-hie-cradle that works with hls, so I've created
# the repository below. Obviously, this is not sustainable as it adds more technical debt.
# We need a better strategy to streamline changes required by HLS from other hie-bios related
# packages.
# See details here: https://github.com/Avi-D-coder/implicit-hie-cradle/compare/master...smunix:implicit-hie-cradle:smunix-patch-hls-1?expand=1
#
haskell-implicit-hie-cradle = {
url = "github:smunix/implicit-hie-cradle?ref=smunix-patch-hls-0.5-1";
flake = false;
};
};
Expand Down