Skip to content

Commit

Permalink
Update flake to use fourmolu plugin in GHC 9 (#2482)
Browse files Browse the repository at this point in the history
* Update nixpkgs to add fourmolu plugin to GHC 9

* Fix GHCIDE build in nix
  • Loading branch information
Ailrun authored Dec 13, 2021
1 parent ae6f707 commit 1124137
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
12 changes: 2 additions & 10 deletions configuration-ghc-901.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,19 @@ let
"hls-tactics-plugin"
"hls-brittany-plugin"
"hls-stylish-haskell-plugin"
"hls-fourmolu-plugin"
];

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

# Released on hackage, but not in nixpkgs yet
primitive-extras = hself.callCabal2nix "primitive-extras" (pkgs.fetchFromGitHub {
owner = "metrix-ai";
repo = "primitive-extras";
rev = "c758d7366b99d85889cb13425fc0140879f8b936";
sha256 = "sha256-vTT7svbM7IkhyxYx2xQ8p1ptoYe+ndcMN5+j9qx++7E=";
}) { };
fourmolu = hself.fourmolu_0_4_0_0;
primitive-extras = hself.primitive-extras_0_10_1_2;

# Re-generate HLS drv excluding some plugins
haskell-language-server =
hself.callCabal2nixWithOptions "haskell-language-server" ./.
(pkgs.lib.concatStringsSep " " [
"-f-brittany"
"-f-fourmolu"
"-f-stylishhaskell"
"-f-tactic"
]) { };
Expand Down
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.

2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
with haskell.lib; {
# Patches don't apply
github = overrideCabal hsuper.github (drv: { patches = []; });
# GHCIDE requires hie-bios >=0.8 && <0.9.0
hie-bios = hself.hie-bios_0_8_0;
# We need an older version
hiedb = hself.hiedb_0_4_1_0;

Expand Down
4 changes: 2 additions & 2 deletions myst-parser.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

buildPythonPackage rec {
pname = "myst-parser";
version = "0.15.1";
version = "0.16.0";

src = fetchPypi {
inherit pname version;
sha256 = "00qnpkfjrn7bqbazm20n3zcci05803cfncvrlvk0rhsbdjiphg3w";
sha256 = "14lzbhciw7ksi219lrcy9afglmg5mx0rmfvrr2x8ssghv4kf8cdy";
};

propagatedBuildInputs = [
Expand Down

0 comments on commit 1124137

Please sign in to comment.