!RbXGJhHMsnQcNIDFWN:nixos.org

Nix Haskell

611 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://nixos.org/manual/nixpkgs/unstable/#haskell | Current PR: https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates | Maintainer Docs: https://github.com/NixOS/nixpkgs/blob/haskell-updates/pkgs/development/haskell-modules/HACKING.md | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | Merger Schedule: https://cloud.maralorn.de/apps/calendar/p/H6migHmKX7xHoTFa/dayGridMonth/now | Join #haskell.nix:libera.chat for question about the alternative haskell.nix infrastructure123 Servers

Load older messages


SenderMessageTime
22 Oct 2024
@maralorn:maralorn.demaralorn
In reply to @b:chreekat.net
I rather doubt it. There used to be a way to say "just use the packages that come with the compiler", which probably would work, but I think that went away when casa came into the scene
Do you know when that was?
11:41:08
@b:chreekat.netchreekatWell hm, in the docs it's still listed as possible11:41:33
@b:chreekat.netchreekathttps://docs.haskellstack.org/en/stable/configure/yaml/project/#snapshot11:41:40
@maralorn:maralorn.demaralornI only have this problem because I am on a terribly outdated nixpkgs anyway …11:41:40
@sternenseemann:systemli.orgsterni
In reply to @maralorn:maralorn.de
You wanna do that in the nixpkgs manual?
yes
11:42:18
@b:chreekat.netchreekat
In reply to @maralorn:maralorn.de
Do you know when that was?
(I wouldn't know)
11:43:25
@b:chreekat.netchreekatcan't repro with a later snapshot, interesting11:47:43
@b:chreekat.netchreekatI think I'll leave it at that, then11:49:09
@niko:nrab.lolniko ⚡️ changed their profile picture.11:49:17
@b:chreekat.netchreekatWell, if anyone else can try my repro, that would be good. I'm worried about some fucked up artifact being cached in ~/.stack or something. This already happened with one of the stack-built Setup binaries: it was built with references to missing symbols, and I had to delete it and rebuild it in a proper shell11:59:07
@maralorn:maralorn.demaralorn
In reply to @maralorn:maralorn.de
Is there an easy way to tell stack to just use all dependencies and ghc from the nix-provided environment and just build my project? Basically ignoring any snapshots?
I am shocked by how easy it is.
14:44:29
@maralorn:maralorn.demaralorn Does anyone know if there is a way to only build the haddocks with our builder? 15:42:05
23 Oct 2024
@cdepillabout:matrix.orgcdepillabout
In reply to @b:chreekat.net
in that issue, cdepillabout reports a problem while using buildStackProject. It looks different to the main problem of the ticket, so maybe I should open another one? In our case (I have the same set of conditions), the thing getting repeated is -I/foo/bar/baz
I have a long-standing issue in one of my projects with this exact problem: https://github.com/cdepillabout/termonad/issues/99 (although I basically just link to the nixpkgs issue as well)
03:22:24
@cdepillabout:matrix.orgcdepillaboutI was also never able to figure out exactly what the problem is here, or even where to report the problem, other than what is posted in that nixpkgs issue03:23:01
@cdepillabout:matrix.orgcdepillabout
In reply to @maralorn:maralorn.de
Is there an easy way to tell stack to just use all dependencies and ghc from the nix-provided environment and just build my project? Basically ignoring any snapshots?
If I remember correctly, it is even possible to do with snapshots as well, as long as you give stack a ghc with a fully-populated package db with the exact versions (and revisions) of all the packages it is expecting from the snapshot.
03:25:24
@cdepillabout:matrix.orgcdepillaboutAlthough if you're going to go this route, it is generally easier for us to just use cabal-install instead.03:25:49
@cdepillabout:matrix.orgcdepillabout
In reply to @b:chreekat.net
Well, if anyone else can try my repro, that would be good. I'm worried about some fucked up artifact being cached in ~/.stack or something. This already happened with one of the stack-built Setup binaries: it was built with references to missing symbols, and I had to delete it and rebuild it in a proper shell
This happens quite frequently if you're using Stack with Nix. You can get your ~/.stack into a bad state if you have a bunch of projects all using stack with the same resolver, but all using widely different Nixpkgs checkouts. Your Haskell libraries end up getting linked to different system library versions, and stack doesn't know how to deal with this.
03:28:13
@b:chreekat.netchreekat
In reply to @cdepillabout:matrix.org
This happens quite frequently if you're using Stack with Nix. You can get your ~/.stack into a bad state if you have a bunch of projects all using stack with the same resolver, but all using widely different Nixpkgs checkouts. Your Haskell libraries end up getting linked to different system library versions, and stack doesn't know how to deal with this.
Aha. Does cabal not have the same problem?
04:28:04
@cdepillabout:matrix.orgcdepillabout Cabal does have the same problem. However, when people use cabal with Nix, it is pretty uncommon to let cabal build dependencies. Most people end up giving cabal a Nix-built package db. So most people don't end up with anything under ~/.cabal/store. So you rarely see people complaining about this in practice. 06:23:20
@alex:tunstall.xyzAlex I imagine that similar things can happen with Cabal's dist-newstyle though? 06:33:26
@b:chreekat.netchreekatbig yikes07:34:29
@cdepillabout:matrix.orgcdepillabout Yeah, I imagine that's true. Although my guess is that developers are much more comfortable with doing cabal clean or stack clean to delete local build caches (dist-newstyle and .stack-work) when faced with strange linking errors. It takes a little bit more of a leap to realize you also have to clean out ~/.cabal/store and ~/.stack. 08:30:02
@maralorn:maralorn.demaralorn cdepillabout: Is there a trick to get stack to not put .stack-work somewhere where it gets copied into the nix-store when I build the package with Nix? 08:50:51
@luna-null:matrix.org@luna-null:matrix.orgSo uh... how do I get haskell to work on nixos? I can get ghci to work but then I can't get some libraries to work09:47:09
@luna-null:matrix.org@luna-null:matrix.orgSpecifically trying to get Text.Pretty.Simple.pPrint and System.Random; seems like they won't work no matter what I do09:47:58
@luna-null:matrix.org@luna-null:matrix.orgAnd every flake or shell I try to get into seems to run into an error; probably because I'm not using cabal or stack right, but still. I'm very stuck09:48:45
@luna-null:matrix.org@luna-null:matrix.org removed their display name Autumn.09:49:26
@b:chreekat.netchreekat @luna-null:matrix.org: big question. :D What is your use case? A ghci session with the packages you want available? 09:53:59
@b:chreekat.netchreekatI'll show how you can do that, but note that it makes for a very different solution that other use cases might use09:54:26
@luna-null:matrix.org@luna-null:matrix.orgFor ghci, I want the Text.Pretty.Simple.pPrint library. For System.Random, I want it for a program I made that used to work but doesn't anymore since switching to nixos09:55:19

Show newer messages


Back to Room ListRoom Version: 6