Skip to content

Commit 1083844

Browse files
committed
chore: Remove support for ghc-8.10
1 parent 17920c7 commit 1083844

File tree

1 file changed

+8
-43
lines changed

1 file changed

+8
-43
lines changed

flake.nix

Lines changed: 8 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,6 @@
7676
schema = ./schema;
7777
})
7878

79-
(final: prev: {
80-
# HLint 3.2.x requires GHC >= 8.10 && < 9.0
81-
hlint = final.haskell-nix.tool "ghc8107" "hlint" {
82-
version = "3.2.7";
83-
};
84-
85-
# Fourmolu 0.10.x requires GHC >= 9.0 && < 9.6
86-
fourmolu = final.haskell-nix.tool "ghc928" "fourmolu" {
87-
version = "0.10.1.0";
88-
};
89-
90-
# Weeder 2.2.0 requires GHC >= 8.10 && < 9.0
91-
weeder = final.haskell-nix.tool "ghc8107" "weeder" {
92-
version = "2.2.0";
93-
};
94-
})
95-
9679
(final: prev: {
9780
postgresql = prev.postgresql.overrideAttrs (_:
9881
final.lib.optionalAttrs (final.stdenv.hostPlatform.isMusl) {
@@ -156,57 +139,39 @@
156139
project = (nixpkgs.haskell-nix.cabalProject' ({ config, lib, pkgs, ... }: rec {
157140
src = ./.;
158141
name = "cardano-db-sync";
159-
compiler-nix-name =
160-
if system == "x86_64-linux"
161-
then lib.mkDefault "ghc810"
162-
else lib.mkDefault "ghc96";
142+
compiler-nix-name = lib.mkDefault "ghc96";
163143
flake.variants =
164144
let
165145
compilers =
166146
if (system == "x86_64-linux") then
167-
["ghc96" "ghc98" "ghc910"]
147+
[ "ghc98" "ghc910" ]
168148
else
169-
["ghc98"];
149+
[ "ghc98" ];
170150
in
171151
lib.genAttrs compilers (c: { compiler-nix-name = c; });
172152

173153
crossPlatforms = p:
174154
lib.optional (system == "x86_64-linux") p.musl64 ++
175-
lib.optional
176-
(system == "x86_64-linux" && config.compiler-nix-name == "ghc966")
177-
p.aarch64-multiplatform-musl;
155+
lib.optional (system == "x86_64-linux") p.aarch64-multiplatform-musl;
178156

179157
inputMap = {
180158
"https://chap.intersectmbo.org/" = inputs.CHaP;
181159
};
182160

183161
shell.tools = {
184162
cabal = "latest";
163+
hlint = "latest";
164+
fourmolu = "latest";
165+
weeder = "latest";
185166
haskell-language-server = {
186-
src =
187-
if config.compiler-nix-name == "ghc8107" then
188-
nixpkgs.haskell-nix.sources."hls-1.10"
189-
else
190-
nixpkgs.haskell-nix.sources."hls-2.9";
167+
src = nixpkgs.haskell-nix.sources."hls-2.9";
191168
};
192169
};
193170
# Now we use pkgsBuildBuild, to make sure that even in the cross
194171
# compilation setting, we don't run into issues where we pick tools
195172
# for the target.
196173
shell.buildInputs = with nixpkgs.pkgsBuildBuild; [
197174
gitAndTools.git
198-
hlint
199-
] ++ lib.optionals (config.compiler-nix-name == "ghc8107") [
200-
# Weeder requires the GHC version to match HIE files
201-
weeder
202-
] ++ lib.optionals (system != "aarch64-darwin") [
203-
# TODO: Fourmolu 0.10 is currently failing to build with aarch64-darwin
204-
#
205-
# Linking dist/build/fourmolu/fourmolu ...
206-
# ld: line 269: 2352 Segmentation fault ...
207-
# clang-11: error: linker command failed with exit code 139 (use -v to see invocation)
208-
# `cc' failed in phase `Linker'. (Exit code: 139)
209-
fourmolu
210175
];
211176
shell.withHoogle = true;
212177
shell.crossPlatforms = _: [];

0 commit comments

Comments
 (0)