haskell-language-server/flake.lock
Guillaume Bouchard 96ea854deb
Nix flake fix dev shells (#2655)
* nix: ghc92: ignore broken plugins

* nix: use current ghc for tools in the shell

Theses tools are pulled in the shell, but we don't need them to match
the GHC version used for development. Said otherwise, as long as we use
a working `cabal-install` to build with GHC 9.2, we don't care if that
cabal-install was built with GHC 8.10.

This gives more chance for theses tools to work and be in the binary
cache of nixpkgs.

* nix: disable shake-bench for ghc921

* nix: fix ghc 9.2 shell

* nix: explicit cabal project in devShell

Using alias, we get the "correct" behavior when typing `cabal build` in
the nix-shell, it points to the current cabal-project file.

* nix: remove special case for different ghc versions

* nix: move implicit-hie-cradle as a flake input

* nix: restore dev shell

This commit restores a working behavior for `nix-shell` or `nix
develop`, for all supported GHC versions.

When entering a `nix-shell`, or `nix develop
.#haskell-language-server-ghcXxX-dev` you will get an environment with
all the dependencies needed to run `cabal build`.

Haskell dependencies will be built by cabal instead of nix. This may be
more robust compared to a shell where dependencies are built by nix:

- It won't try to build any dependency with nix. This mean that it won't
  benefit from nix caching, but on the other hand, it will perfectly
  match the cabal plan.
- The nix shell may fail to start if an (possibly unneeded) dependency
  was failing to build.

Entering nix-shell also generates an alias command `cabal_project` which
runs cabal with the correct project file if needed (e.g. for GHC 9.0 and
9.2). Users are notified with a message when entering the shell.

The old behavior (i.e. where dependencies are built with nix) is still
available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e.
suffix the name of the shell with `-nix`).

* nix: New entries which build all target at once

All HLS version can be built with `nix build
.#all-haskell-language-server`, and all development shells with `nix
build .#all-dev-shells`.

I had to workaround a limitation in `nix build` which is not able to
build multiples targets, instead I used linkFarmFromDrvs.

All packages and shells are now named with a unique package name
containing the GHC version.

* nix: Build all devShells and all binaries in CI

* nix: build HLS with dynamic linking

Related to #2668.

This fixs the build, however, because now HLS is dynamicly linked, it
pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`.

* nix; fix CI command

* nix: only build dev shell with nix packages for current GHC version

* Another tentative to fix the build

* fix: Eval and alternate number format works with ghc 9.2

* fix CI build

* ANother tentative fix
2022-02-16 12:24:22 +00:00

244 lines
7.4 KiB
JSON

{
"nodes": {
"constraints-extras": {
"flake": false,
"locked": {
"narHash": "sha256-WGDSpT37RrHwpQtExGkL5eEmBk/s9b0rxtT9DYqSGg4=",
"type": "tarball",
"url": "https://hackage.haskell.org/package/constraints-extras-0.3.2.1/constraints-extras-0.3.2.1.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://hackage.haskell.org/package/constraints-extras-0.3.2.1/constraints-extras-0.3.2.1.tar.gz"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1641205782,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1629481132,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "997f7efcb746a9c140ce1f13c72263189225f482",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fourmolu": {
"flake": false,
"locked": {
"narHash": "sha256-uo5UE2SzrimnZl+JjJ30Hlg/nIw1OXJTPFIgkQopaI0=",
"type": "tarball",
"url": "https://hackage.haskell.org/package/fourmolu-0.5.0.1/fourmolu-0.5.0.1.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://hackage.haskell.org/package/fourmolu-0.5.0.1/fourmolu-0.5.0.1.tar.gz"
}
},
"ghc-exactprint": {
"flake": false,
"locked": {
"narHash": "sha256-8OWLBQj0WYi1f91EE3d5Pq+lTjY+FQei37NEedDtKeo=",
"type": "tarball",
"url": "https://hackage.haskell.org/package/ghc-exactprint-1.4.1/ghc-exactprint-1.4.1.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://hackage.haskell.org/package/ghc-exactprint-1.4.1/ghc-exactprint-1.4.1.tar.gz"
}
},
"gitignore": {
"flake": false,
"locked": {
"lastModified": 1611672876,
"narHash": "sha256-qHu3uZ/o9jBHiA3MEKHJ06k7w4heOhA+4HCSIvflRxo=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "211907489e9f198594c0eb0ca9256a1949c9d412",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hlint": {
"flake": false,
"locked": {
"narHash": "sha256-Kz6adx97kY7ojoDlw3y0R6LQ0h/EtXGR5+N07/b6uGk=",
"type": "tarball",
"url": "https://hackage.haskell.org/package/hlint-3.3.6/hlint-3.3.6.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://hackage.haskell.org/package/hlint-3.3.6/hlint-3.3.6.tar.gz"
}
},
"implicit-hie-cradle": {
"flake": false,
"locked": {
"narHash": "sha256-2NmucBBI7Qi1UGXWG27XFZRCeqeRiwVFWmJKZnp6R5U=",
"type": "tarball",
"url": "https://hackage.haskell.org/package/implicit-hie-cradle-0.3.0.5/implicit-hie-cradle-0.3.0.5.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://hackage.haskell.org/package/implicit-hie-cradle-0.3.0.5/implicit-hie-cradle-0.3.0.5.tar.gz"
}
},
"lsp": {
"flake": false,
"locked": {
"narHash": "sha256-OcyNHNRh9j5nbJ8SjaNAWIEKuixAJlA7+vTimFY0c2c=",
"type": "tarball",
"url": "https://hackage.haskell.org/package/lsp-1.4.0.0/lsp-1.4.0.0.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://hackage.haskell.org/package/lsp-1.4.0.0/lsp-1.4.0.0.tar.gz"
}
},
"lsp-test": {
"flake": false,
"locked": {
"narHash": "sha256-IOmbQH6tKdu9kAyirvLx6xFS2N+/tbs6vZn0mNGm3No=",
"type": "tarball",
"url": "https://hackage.haskell.org/package/lsp-test-0.14.0.2/lsp-test-0.14.0.2.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://hackage.haskell.org/package/lsp-test-0.14.0.2/lsp-test-0.14.0.2.tar.gz"
}
},
"lsp-types": {
"flake": false,
"locked": {
"narHash": "sha256-HGg4upgirM6/px+vflY5S0Y79gAIDpl32Ad9mbbzTdU=",
"type": "tarball",
"url": "https://hackage.haskell.org/package/lsp-types-1.4.0.1/lsp-types-1.4.0.1.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://hackage.haskell.org/package/lsp-types-1.4.0.1/lsp-types-1.4.0.1.tar.gz"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1639357775,
"narHash": "sha256-mJJFCPqZi1ZO3CvgEfN2nFAYv4uAJSRnTKzLFi61+WA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c473cc8714710179df205b153f4e9fa007107ff9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1641016545,
"narHash": "sha256-JMNwvnBzG0RjGG3eH27Y5/GlJ9ryeCdGJfqGbqxnmZY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6f05cfdb1e78d36c0337516df674560e4b51c79b",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1624971177,
"narHash": "sha256-Amf/nBj1E77RmbSSmV+hg6YOpR+rddCbbVgo5C7BS0I=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "397f0713d007250a2c7a745e555fa16c5dc8cadb",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"retrie": {
"flake": false,
"locked": {
"narHash": "sha256-SrUyFea9Qr2SYeNVDJfWZfCguJV2rHK2mO/FO4xLFaY=",
"type": "tarball",
"url": "https://hackage.haskell.org/package/retrie-1.2.0.1/retrie-1.2.0.1.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://hackage.haskell.org/package/retrie-1.2.0.1/retrie-1.2.0.1.tar.gz"
}
},
"root": {
"inputs": {
"constraints-extras": "constraints-extras",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"fourmolu": "fourmolu",
"ghc-exactprint": "ghc-exactprint",
"gitignore": "gitignore",
"hlint": "hlint",
"implicit-hie-cradle": "implicit-hie-cradle",
"lsp": "lsp",
"lsp-test": "lsp-test",
"lsp-types": "lsp-types",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks",
"retrie": "retrie"
}
}
},
"root": "root",
"version": 7
}