|
19 | 19 | flake = false;
|
20 | 20 | };
|
21 | 21 |
|
22 |
| - # List of hackage dependencies |
23 |
| - lsp = { |
24 |
| - url = "https://hackage.haskell.org/package/lsp-1.6.0.0/lsp-1.6.0.0.tar.gz"; |
| 22 | + # cabal hashes contains all the version for different haskell packages, to update: |
| 23 | + # nix flake lock --update-input all-cabal-hashes-unpacked |
| 24 | + all-cabal-hashes-unpacked = { |
| 25 | + url = "github:commercialhaskell/all-cabal-hashes/current-hackage"; |
25 | 26 | flake = false;
|
26 | 27 | };
|
27 |
| - lsp-types = { |
28 |
| - url = "https://hackage.haskell.org/package/lsp-types-1.6.0.0/lsp-types-1.6.0.0.tar.gz"; |
| 28 | + |
| 29 | + # List of hackage dependencies |
| 30 | + lsp = { |
| 31 | + url = "github:haskell/lsp/b0f8596887088b8ab65fc1015c773f45b47234ae"; |
29 | 32 | flake = false;
|
30 | 33 | };
|
31 | 34 | lsp-test = {
|
|
100 | 103 | poetry2nix.url = "github:nix-community/poetry2nix/master";
|
101 | 104 | };
|
102 | 105 | outputs =
|
103 |
| - inputs@{ self, nixpkgs, flake-compat, flake-utils, gitignore, ... }: |
| 106 | + inputs@{ self, nixpkgs, flake-compat, flake-utils, gitignore, all-cabal-hashes-unpacked, ... }: |
104 | 107 | {
|
105 | 108 | overlays.default = final: prev:
|
106 | 109 | with prev;
|
|
156 | 159 | # GHCIDE requires hie-bios ^>=0.9.1
|
157 | 160 | hie-bios = hself.callCabal2nix "hie-bios" inputs.hie-bios {};
|
158 | 161 |
|
159 |
| - lsp = hsuper.callCabal2nix "lsp" inputs.lsp {}; |
160 |
| - lsp-types = hsuper.callCabal2nix "lsp-types" inputs.lsp-types {}; |
| 162 | + lsp = hsuper.callCabal2nix "lsp" "${inputs.lsp}/lsp" {}; |
| 163 | + lsp-types = hsuper.callCabal2nix "lsp-types" "${inputs.lsp}/lsp-types" {}; |
161 | 164 | lsp-test = hsuper.callCabal2nix "lsp-test" inputs.lsp-test {};
|
162 | 165 |
|
163 | 166 | implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.implicit-hie-cradle {};
|
|
186 | 189 | in {
|
187 | 190 | inherit hlsSources;
|
188 | 191 |
|
| 192 | + all-cabal-hashes = prev.runCommand "all-cabal-hashes.tar.gz" |
| 193 | + { } |
| 194 | + '' |
| 195 | + cd ${all-cabal-hashes-unpacked} |
| 196 | + cd .. |
| 197 | + tar czf $out $(basename ${all-cabal-hashes-unpacked}) |
| 198 | + ''; |
| 199 | + |
189 | 200 | # Haskell packages extended with our packages
|
190 | 201 | hlsHpkgs = compiler: extended haskell.packages.${compiler};
|
191 | 202 |
|
|
216 | 227 |
|
217 | 228 | ghc902Config = (import ./configuration-ghc-90.nix) { inherit pkgs inputs; };
|
218 | 229 | ghc924Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; };
|
219 |
| - ghc941Config = (import ./configuration-ghc-94.nix) { inherit pkgs inputs; }; |
| 230 | + ghc942Config = (import ./configuration-ghc-94.nix) { inherit pkgs inputs; }; |
220 | 231 |
|
221 | 232 | # GHC versions
|
222 | 233 | # While HLS still works fine with 8.10 GHCs, we only support the versions that are cached
|
|
226 | 237 | cases = {
|
227 | 238 | ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902");
|
228 | 239 | ghc924 = ghc924Config.tweakHpkgs (pkgs.hlsHpkgs "ghc924");
|
229 |
| - ghc941 = ghc941Config.tweakHpkgs (pkgs.hlsHpkgs "ghc941"); |
| 240 | + ghc942 = ghc942Config.tweakHpkgs (pkgs.hlsHpkgs "ghc942"); |
230 | 241 | };
|
231 | 242 | in { default = cases."${ghcVersion}"; } // cases;
|
232 | 243 |
|
233 | 244 | ghc902 = supportedGHCs.ghc902;
|
234 | 245 | ghc924 = supportedGHCs.ghc924;
|
235 |
| - ghc941 = supportedGHCs.ghc941; |
| 246 | + ghc942 = supportedGHCs.ghc942; |
236 | 247 | ghcDefault = supportedGHCs.default;
|
237 | 248 |
|
238 | 249 | # For markdown support
|
|
282 | 293 | hpkgs.ghc
|
283 | 294 | pkgs.cabal-install
|
284 | 295 | # @guibou: I'm not sure hie-bios is needed
|
285 |
| - ghcDefault.hie-bios |
| 296 | + pkgs.haskellPackages.hie-bios |
286 | 297 | # Dependencies needed to build some parts of hackage
|
287 | 298 | gmp zlib ncurses
|
288 | 299 | # Changelog tooling
|
289 |
| - (gen-hls-changelogs ghcDefault) |
| 300 | + (gen-hls-changelogs pkgs.haskellPackages) |
290 | 301 | # For the documentation
|
291 | 302 | pythonWithPackages
|
292 | 303 | # @guibou: I'm not sure this is needed.
|
293 | 304 | hlint
|
294 |
| - ghcDefault.opentelemetry-extra |
| 305 | + pkgs.haskellPackages.opentelemetry-extra |
295 | 306 | capstone tracy
|
296 | 307 | # ormolu
|
297 | 308 | # stylish-haskell
|
|
345 | 356 | src = null;
|
346 | 357 | };
|
347 | 358 | # Create a hls executable
|
348 |
| - # Copied from https://github.com/NixOS/nixpkgs/blob/210784b7c8f3d926b7db73bdad085f4dc5d79418/pkgs/development/tools/haskell/haskell-language-server/withWrapper.nix#L16 |
| 359 | + # Copied from https://github.com/NixOS/nixpkgs/blob/210784b7c8f3d926b7db73bdad085f4dc5d79428/pkgs/development/tools/haskell/haskell-language-server/withWrapper.nix#L16 |
349 | 360 | mkExe = hpkgs:
|
350 | 361 | with pkgs.haskell.lib;
|
351 | 362 | (enableSharedExecutables (overrideCabal hpkgs.haskell-language-server
|
|
365 | 376 | haskell-language-server-dev = mkDevShell ghcDefault "cabal.project";
|
366 | 377 | haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project";
|
367 | 378 | haskell-language-server-924-dev = mkDevShell ghc924 "cabal.project";
|
368 |
| - haskell-language-server-941-dev = mkDevShell ghc941 "cabal.project"; |
| 379 | + haskell-language-server-942-dev = mkDevShell ghc942 "cabal.project"; |
369 | 380 | };
|
370 | 381 |
|
371 | 382 | # Developement shell, haskell packages are also provided by nix
|
372 | 383 | nixDevShells = {
|
373 | 384 | haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project";
|
374 | 385 | haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project";
|
375 | 386 | haskell-language-server-924-dev-nix = mkDevShellWithNixDeps ghc924 "cabal.project";
|
376 |
| - haskell-language-server-941-dev-nix = mkDevShellWithNixDeps ghc941 "cabal.project"; |
| 387 | + haskell-language-server-942-dev-nix = mkDevShellWithNixDeps ghc942 "cabal.project"; |
377 | 388 | };
|
378 | 389 |
|
379 | 390 | allPackages = {
|
380 | 391 | haskell-language-server = mkExe ghcDefault;
|
381 | 392 | haskell-language-server-902 = mkExe ghc902;
|
382 | 393 | haskell-language-server-924 = mkExe ghc924;
|
383 |
| - haskell-language-server-941 = mkExe ghc941; |
| 394 | + haskell-language-server-942 = mkExe ghc942; |
384 | 395 | };
|
385 | 396 |
|
386 | 397 | devShells = simpleDevShells // nixDevShells // {
|
|
0 commit comments