|
76 | 76 | schema = ./schema;
|
77 | 77 | })
|
78 | 78 |
|
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 |
| - |
96 | 79 | (final: prev: {
|
97 | 80 | postgresql = prev.postgresql.overrideAttrs (_:
|
98 | 81 | final.lib.optionalAttrs (final.stdenv.hostPlatform.isMusl) {
|
|
156 | 139 | project = (nixpkgs.haskell-nix.cabalProject' ({ config, lib, pkgs, ... }: rec {
|
157 | 140 | src = ./.;
|
158 | 141 | 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"; |
163 | 143 | flake.variants =
|
164 | 144 | let
|
165 | 145 | compilers =
|
166 | 146 | if (system == "x86_64-linux") then
|
167 |
| - ["ghc96" "ghc98" "ghc910"] |
| 147 | + [ "ghc98" "ghc910" ] |
168 | 148 | else
|
169 |
| - ["ghc98"]; |
| 149 | + [ "ghc98" ]; |
170 | 150 | in
|
171 | 151 | lib.genAttrs compilers (c: { compiler-nix-name = c; });
|
172 | 152 |
|
173 | 153 | crossPlatforms = p:
|
174 | 154 | 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; |
178 | 156 |
|
179 | 157 | inputMap = {
|
180 | 158 | "https://chap.intersectmbo.org/" = inputs.CHaP;
|
181 | 159 | };
|
182 | 160 |
|
183 | 161 | shell.tools = {
|
184 | 162 | cabal = "latest";
|
| 163 | + hlint = "latest"; |
| 164 | + fourmolu = "latest"; |
| 165 | + weeder = "latest"; |
185 | 166 | 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"; |
191 | 168 | };
|
192 | 169 | };
|
193 | 170 | # Now we use pkgsBuildBuild, to make sure that even in the cross
|
194 | 171 | # compilation setting, we don't run into issues where we pick tools
|
195 | 172 | # for the target.
|
196 | 173 | shell.buildInputs = with nixpkgs.pkgsBuildBuild; [
|
197 | 174 | 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 |
210 | 175 | ];
|
211 | 176 | shell.withHoogle = true;
|
212 | 177 | shell.crossPlatforms = _: [];
|
|
0 commit comments