summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2020-10-18 21:21:03 +0200
committerJan Tojnar <jtojnar@gmail.com>2020-10-18 21:21:03 +0200
commit5c766c5c2464d40cb86c780d36d95e96c1d4e2c1 (patch)
treea5b97b01dc7fea871f9dbf5b5a4a5ead076d4e15 /doc
parent79b07bba8ffa6ce8be749f49008cab233fc287d6 (diff)
parent5e67d80a8ba61fe0467b633c1cb63143c66a26a6 (diff)
downloadnixpkgs-5c766c5c2464d40cb86c780d36d95e96c1d4e2c1.tar
nixpkgs-5c766c5c2464d40cb86c780d36d95e96c1d4e2c1.tar.gz
nixpkgs-5c766c5c2464d40cb86c780d36d95e96c1d4e2c1.tar.bz2
nixpkgs-5c766c5c2464d40cb86c780d36d95e96c1d4e2c1.tar.lz
nixpkgs-5c766c5c2464d40cb86c780d36d95e96c1d4e2c1.tar.xz
nixpkgs-5c766c5c2464d40cb86c780d36d95e96c1d4e2c1.tar.zst
nixpkgs-5c766c5c2464d40cb86c780d36d95e96c1d4e2c1.zip
Merge branch 'staging-next' into staging
Diffstat (limited to 'doc')
-rw-r--r--doc/builders/packages/opengl.xml2
-rw-r--r--doc/languages-frameworks/haskell.section.md33
2 files changed, 34 insertions, 1 deletions
diff --git a/doc/builders/packages/opengl.xml b/doc/builders/packages/opengl.xml
index 5f4433a2884..dfd64b18858 100644
--- a/doc/builders/packages/opengl.xml
+++ b/doc/builders/packages/opengl.xml
@@ -4,6 +4,6 @@
  <title>OpenGL</title>
 
  <para>
-  Packages that use OpenGL have NixOS desktop as their primary target. The current solution for loading the GPU-specific drivers is based on <literal>libglvnd</literal> and looks for the driver implementation in <literal>LD_LIBRARY_PATH</literal>. If you are using a non-NixOS GNU/Linux/X11 desktop with free software video drivers, consider launching OpenGL-dependent programs from Nixpkgs with Nixpkgs versions of <literal>libglvnd</literal> and <literal>mesa_drivers</literal> in <literal>LD_LIBRARY_PATH</literal>. For proprietary video drivers you might have luck with also adding the corresponding video driver package.
+  Packages that use OpenGL have NixOS desktop as their primary target. The current solution for loading the GPU-specific drivers is based on <literal>libglvnd</literal> and looks for the driver implementation in <literal>LD_LIBRARY_PATH</literal>. If you are using a non-NixOS GNU/Linux/X11 desktop with free software video drivers, consider launching OpenGL-dependent programs from Nixpkgs with Nixpkgs versions of <literal>libglvnd</literal> and <literal>mesa.drivers</literal> in <literal>LD_LIBRARY_PATH</literal>. For proprietary video drivers you might have luck with also adding the corresponding video driver package.
  </para>
 </section>
diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md
index cba4d0561b0..c2838c733c7 100644
--- a/doc/languages-frameworks/haskell.section.md
+++ b/doc/languages-frameworks/haskell.section.md
@@ -359,6 +359,39 @@ services.hoogle = {
 };
 ```
 
+### How to install haskell-language-server
+
+In short: Install `pkgs.haskell-language-server` and use the
+`haskell-language-server-wrapper` command to run it. See the [hls
+README](https://github.com/haskell/haskell-language-server) on how to configure
+your text editor to use hls and how to test your setup.
+
+Hls needs to be compiled with the ghc version of the project you use it on.
+
+`pkgs.haskell-language-server` provides `haskell-language-server-wrapper`,
+`haskell-language-server`, `haskell-language-server-x.x` and
+`haskell-language-server-x.x.x` binaries, where `x.x.x` is the ghc version for
+which it is compiled.  By default it includes binaries for all ghc versions
+that are provided in the binary caches. You can override that list with e.g.
+
+```nix
+pkgs.haskell-language-server.override { supportedGhcVersions = [ "884" "901" ]; }
+```
+
+When you run `haskell-language-server-wrapper` it will detect the ghc version
+used by the project you are working on (by asking e.g. cabal or stack) and pick
+the appropriate above mentioned binary from your path.
+
+Be careful when installing hls globally and using a pinned nixpkgs for a Haskell
+project in a nix-shell. If the nixpkgs versions deviate to much (e.g. use
+different `glibc` versions) hls might fail. It is recommended to then install hls
+in the nix-shell from the nixpkgs version pinned in there.
+
+If you know, that you only use one ghc version, e.g. in a project specific
+nix-shell You can either use an override as given above or simply install
+`pkgs.haskellPackages.haskell-language-server` instead of the top-level
+attribute `pkgs.haskell-language-server`.
+
 ### How to build a Haskell project using Stack
 
 [Stack](http://haskellstack.org) is a popular build tool for Haskell projects.