!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
31 Dec 2024
@megmug:matrix.org@megmug:matrix.orgThat sounds interesting, that would mean some more reading on my part since i dont understand stack well enough to be able to say what hie.yaml even does off the top of my head17:16:21
@alexfmpe:matrix.orgalexfmpeNot sure if it's stack specific. Though if your hls works on the terminal it doesn't look like it needs handholding there17:17:04
@alexfmpe:matrix.orgalexfmpeI just got tired of chasing ghosts and chewed all the food I could for HLS17:17:27
@megmug:matrix.org@megmug:matrix.orgSo, you are personally using an older vscode haskell extension? Should I also be doing that or do you have other reasons?17:17:43
@alexfmpe:matrix.orgalexfmpeNo reason other than I hadn't noticed I was behind really17:18:14
@alexfmpe:matrix.orgalexfmpeAlso setup my vscode with nix, but was unaware there's a better source for vscode extensions than the default one in home manager / nixpkgs17:19:02
@megmug:matrix.org@megmug:matrix.orgSo you are on nixos and therefore getting vscode itself and the extensions also from nix?17:20:11
@alexfmpe:matrix.orgalexfmpeHmm on my nixos I use emacs really. Have nix-managed vscode on the macos for work since I need to dogfood for the team being the default nix guy currently17:21:25
@alexfmpe:matrix.orgalexfmpeThat should be independent from your issue really17:21:48
@alexfmpe:matrix.orgalexfmpeEveryone else on the team using vscode gets it from non nix channels and follows the same config steps after17:22:22
@alexfmpe:matrix.orgalexfmperun code in project's nix shell etc17:22:35
@alexfmpe:matrix.orgalexfmpe* run code/codium in project's nix shell etc17:22:46
@megmug:matrix.org@megmug:matrix.orgHuh, I just enabled the multipleComponents setting and suddenly the extension works again. Let's see for how long 17:23:57
@megmug:matrix.org@megmug:matrix.orgProblem is it's hard to say if it just randomly works again because i restarted vscode or if the setting actually helped17:24:32
@alexfmpe:matrix.orgalexfmpeI haven't enabled it myself because my old ass vscode extension doesn't support it, so I know it's not absolutely necessary17:25:00
@alexfmpe:matrix.orgalexfmpeBut I don't use stack so that could matter17:25:10
@alexfmpe:matrix.orgalexfmpe
In reply to @megmug:matrix.org
Problem is it's hard to say if it just randomly works again because i restarted vscode or if the setting actually helped
Yeah you want to restart once per change so you later know what was actually needed
17:25:44
@alexfmpe:matrix.orgalexfmpeIt makes sense to start from the 'sane defaults' state where you seem to be now anyway 17:26:40
@megmug:matrix.org@megmug:matrix.org alexfmpe: Anyways, maybe your tip has helped me, at least for now, so thanks for that! Have been trying stuff for hours and happy that it works again at all 😅 17:29:47
@feichtmeier:matrix.org@feichtmeier:matrix.org joined the room.18:10:43
@symphorien:xlumurb.eusymphorien

hi I'm trying to cross compile nix-tree (from x86_64 to armv7, but I have the same issue to aarch64) and I get this error:

┃ error: builder for '/nix/store/4p2l2rr9788gigjj4jlz6yv7dc69kz46-vty-aarch64-unknown-linux-gnu-6.1.drv' failed with exit code 1;
┃        last 25 log lines:
┃        > Preprocessing library for vty-6.1..
┃        > Building library for vty-6.1..
┃        > [ 1 of 24] Compiling Graphics.Text.Width ( src/Graphics/Text/Width.hs, dist/build/Graphics/Text/Width.o, dist/build/Graphics/Text/Width.dyn_o )
┃        > [ 2 of 24] Compiling Graphics.Vty.Attributes.Color240 ( src/Graphics/Vty/Attributes/Color240.hs, dist/build/Graphics/Vty/Attributes/Color240.o, dist/build/Graphics/Vty/Attribute…
┃        > [ 3 of 24] Compiling Graphics.Vty.Attributes.Color ( src/Graphics/Vty/Attributes/Color.hs, dist/build/Graphics/Vty/Attributes/Color.o, dist/build/Graphics/Vty/Attributes/Color.d…
┃        > [ 4 of 24] Compiling Graphics.Vty.Attributes ( src/Graphics/Vty/Attributes.hs, dist/build/Graphics/Vty/Attributes.o, dist/build/Graphics/Vty/Attributes.dyn_o )
┃        > [ 5 of 24] Compiling Graphics.Vty.DisplayAttributes ( src/Graphics/Vty/DisplayAttributes.hs, dist/build/Graphics/Vty/DisplayAttributes.o, dist/build/Graphics/Vty/DisplayAttribut…
┃        > [ 6 of 24] Compiling Graphics.Vty.Error ( src/Graphics/Vty/Error.hs, dist/build/Graphics/Vty/Error.o, dist/build/Graphics/Vty/Error.dyn_o )
┃        > [ 7 of 24] Compiling Graphics.Vty.Image.Internal ( src/Graphics/Vty/Image/Internal.hs, dist/build/Graphics/Vty/Image/Internal.o, dist/build/Graphics/Vty/Image/Internal.dyn_o )
┃        > [ 8 of 24] Compiling Graphics.Vty.Image ( src/Graphics/Vty/Image.hs, dist/build/Graphics/Vty/Image.o, dist/build/Graphics/Vty/Image.dyn_o )
┃        > [ 9 of 24] Compiling Graphics.Vty.Input.Events ( src/Graphics/Vty/Input/Events.hs, dist/build/Graphics/Vty/Input/Events.o, dist/build/Graphics/Vty/Input/Events.dyn_o )
┃        > [10 of 24] Compiling Graphics.Vty.Input ( src/Graphics/Vty/Input.hs, dist/build/Graphics/Vty/Input.o, dist/build/Graphics/Vty/Input.dyn_o )
┃        > [11 of 24] Compiling Graphics.Vty.Config ( src/Graphics/Vty/Config.hs, dist/build/Graphics/Vty/Config.o, dist/build/Graphics/Vty/Config.dyn_o )
┃        > [12 of 24] Compiling Graphics.Vty.Picture ( src/Graphics/Vty/Picture.hs, dist/build/Graphics/Vty/Picture.o, dist/build/Graphics/Vty/Picture.dyn_o )
┃        > [13 of 24] Compiling Graphics.Vty.Span ( src/Graphics/Vty/Span.hs, dist/build/Graphics/Vty/Span.o, dist/build/Graphics/Vty/Span.dyn_o )
┃        > [14 of 24] Compiling Graphics.Vty.PictureToSpans ( src/Graphics/Vty/PictureToSpans.hs, dist/build/Graphics/Vty/PictureToSpans.o, dist/build/Graphics/Vty/PictureToSpans.dyn_o )
┃        >
┃        > <no location info>: error:
┃        >     Couldn't find a target code interpreter. Try with -fexternal-interpreter
┃        > [17 of 24] Compiling Graphics.Vty.Debug ( src/Graphics/Vty/Debug.hs, dist/build/Graphics/Vty/Debug.o, dist/build/Graphics/Vty/Debug.dyn_o )
┃        > [18 of 24] Compiling Graphics.Vty.UnicodeWidthTable.Types ( src/Graphics/Vty/UnicodeWidthTable/Types.hs, dist/build/Graphics/Vty/UnicodeWidthTable/Types.o, dist/build/Graphics/V…
┃        > [19 of 24] Compiling Graphics.Vty.UnicodeWidthTable.Query ( src/Graphics/Vty/UnicodeWidthTable/Query.hs, dist/build/Graphics/Vty/UnicodeWidthTable/Query.o, dist/build/Graphics/V…
┃        > [20 of 24] Compiling Graphics.Vty.UnicodeWidthTable.Install ( src/Graphics/Vty/UnicodeWidthTable/Install.hs, dist/build/Graphics/Vty/UnicodeWidthTable/Install.o, dist/build/Grap…
┃        > [21 of 24] Compiling Graphics.Vty.UnicodeWidthTable.IO ( src/Graphics/Vty/UnicodeWidthTable/IO.hs, dist/build/Graphics/Vty/UnicodeWidthTable/IO.o, dist/build/Graphics/Vty/Unicod…
┃        > [22 of 24] Compiling Graphics.Vty.UnicodeWidthTable.Main ( src/Graphics/Vty/UnicodeWidthTable/Main.hs, dist/build/Graphics/Vty/UnicodeWidthTable/Main.o, dist/build/Graphics/Vty/…
┃        For full logs, run 'nix-store -l /nix/store/4p2l2rr9788gigjj4jlz6yv7dc69kz46-vty-aarch64-unknown-linux-gnu-6.1.drv'.

is there a standard solution to provide this -fexternal-interpreter ?

19:40:45
@sternenseemann:systemli.orgsterni (he/him) symphorien: no, not at the moment. haskell.nix has a scheme to start the iserv via qemu user mode emulation which we should eventually copy (last time someone tried they ran into some issues, but they may be solvable) 20:50:27
@sternenseemann:systemli.orgsterni (he/him)if you can be bothered to set up haskell.nix, it should work20:50:47
@symphorien:xlumurb.eusymphoriennot really, I have never touched haskell20:51:14
@symphorien:xlumurb.eusymphorien

other question: when I cross compile nixfmt I get a cycle error: error: cycle detected in build of '/nix/store/6fkj0g525s4m17wngzvbbakshgg81v53-nixfmt-armv7l-unknown-linux-gnueabihf-0.6.0.drv' in the references of output 'bin' from output 'out' any idea ?

20:56:15
@sternenseemann:systemli.orgsterni (he/him) hm interesting I've never noticed that, will need to investigate that. I guess dead code elimination doesn't work there… You can probably work around it by using haskell.lib.compose.overrideCabal { enableSeparateBinOutput = false; } nixfmt. 20:59:53
@symphorien:xlumurb.eusymphorien

I must be holding it wrong nix-build -E 'let pkgs = import ./. {}; in with pkgs.pkgsCross.armv7l-hf-multiplatform; haskell.lib.compose.overrideCabal { enableSeparateBinOutput = false; } nixfmt'

21:05:56
@symphorien:xlumurb.eusymphorien

error: attribute 'override' missing

21:06:12
@sternenseemann:systemli.orgsterni (he/him)interesting it doesn't work if the output is preselected, probably some fix point is wrong there 21:11:19
@sternenseemann:systemli.orgsterni (he/him) try haskellPackages.nixfmt instead that works! 21:11:27

Show newer messages


Back to Room ListRoom Version: 6