!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

730 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org146 Servers

Load older messages


SenderMessageTime
24 Jan 2025
@profpatsch:augsburg.oneProfpatschkspatlas: I just use it with haskellPackages and it works just fine14:28:44
@maralorn:maralorn.demaralornInstall hls this way: https://nixos.org/manual/nixpkgs/unstable/#haskell-language-server14:29:20
@maralorn:maralorn.demaralorni.e. just install pkgs.haskell-language-server14:30:00
@profpatsch:augsburg.oneProfpatschpkgs.mkShell { buildInputs = [ pkgs.cabal-install pkgs.haskell-language-server ] } 14:30:03
@profpatsch:augsburg.oneProfpatschThen start vscode from within the nix-shell14:30:13
@maralorn:maralorn.demaralornBut I have to say. I just gave it a quick google. That is wildliy underdocumented for nixos.14:30:37
@maralorn:maralorn.demaralornThe docs of the VSCode docs basically do not mention that it works without ghcup.14:31:01
@profpatsch:augsburg.oneProfpatschmaralorn: mainly cause I wouldn’t expect it to just work :P14:31:06
@maralorn:maralorn.demaralorn* The docs of the VSCode extension basically do not mention that it works without ghcup.14:31:10
@maralorn:maralorn.demaralornAnd I wrote a manual section about the minuatiae of picking the right hls but editor config is left as an excercise to the reader. ^^14:32:08
@alex:tunstall.xyzAlex
In reply to @profpatsch:augsburg.one
maralorn: mainly cause I wouldn’t expect it to just work :P
AFAIK none of the other LSP clients try to install HLS themselves when it isn't missing, so if anything VSCode's "recommended" method is strange to me.
I could see someone asking "what if I need a custom-built GHC to [do some extremely niche thing]? ghcup's one doesn't work"
15:05:08
@alex:tunstall.xyzAlex * AFAIK none of the other LSP clients try to install HLS themselves when it is missing, so if anything VSCode's "recommended" method is strange to me.
I could see someone asking "what if I need a custom-built GHC to [do some extremely niche thing]? ghcup's one doesn't work"
15:05:17
@alexfmpe:matrix.orgalexfmpe
In reply to @maralorn:maralorn.de
And I wrote a manual section about the minuatiae of picking the right hls but editor config is left as an excercise to the reader. ^^
Been using vscode on the mac via home manager
16:01:07
@alexfmpe:matrix.orgalexfmpeIs nice16:01:12
@alexfmpe:matrix.orgalexfmpeNever used ghcup16:02:11
@alexfmpe:matrix.orgalexfmpeI just tell HLS to take it from PATH and nix shell on the relevant project16:02:34
@profpatsch:augsburg.oneProfpatschalex: It’s a pretty good default to install GHC if it’s missing imho16:23:17
@profpatsch:augsburg.oneProfpatschthat’s what ghcup is for after all16:23:23
@profpatsch:augsburg.oneProfpatschon an average Ubuntu that probably works16:23:39
@b:chreekat.netchreekat Why did I only just now learn that cabal2nix https://path-to-commit.zip does exactly what it should do 😩 16:26:11
@maralorn:maralorn.demaralornOpinions whether it should actually do that differ. 😄17:03:11
@b:chreekat.netchreekati don't wanna know :D17:06:19
@b:chreekat.netchreekat But I do wanna know how to ... do the thing... I have done a dozen times.... and override packages down in the dependency tree 17:08:54
@maralorn:maralorn.demaralornoverrideScope?17:12:35
@b:chreekat.netchreekatnever used it before17:18:22
@b:chreekat.netchreekatnah I need the haskellPackages.override thing I think17:24:05
@tobioloke:matrix.orgtobz619
In reply to @alexfmpe:matrix.org
I just tell HLS to take it from PATH and nix shell on the relevant project
does this work over different ghc versions?
17:26:22
@b:chreekat.netchreekat tobz619: nah, you need to pull hls and ghc from the same nixpkgs pin for them to work together 17:40:55
@maralorn:maralorn.demaralorn chreekat: That’s true. But a sensible nix-shell will do exactly that. So yeah, tobz619 That totally works for different ghc versions. 17:42:31
@maralorn:maralorn.demaralorn Huh, maybe a misunderstanding. I am pretty sure alexfmpe meant to set the PATH with the HLS via the nix-shell. 17:43:40

Show newer messages


Back to Room ListRoom Version: 6