I must admit to some surprise just how much of a struggle I'm having using haskell in nixos (example: I want to use the net-mqtt library). I thought haskell was approximately a first-class citizen of nix
Obviously part of this is just not knowing Haskell at all well. Haskell-in-Nix seems to add to the things I need to learn (e.g. all the dependency management is explained in terms of how it works with/replaces cabal/stack etc => I need to know those things first)
and it's partly also my own bloody-mindedness in wanting to do things locally without having to mess around with the per-user config (~/.config/nix) or per-machine config (/etc/nixos/configuration.nix)
@email@example.com I expect that's the path I will take, but given that the package I want to use (net-mqtt) is marked broken in nixpkgs, I think it's some way off.
Look, I get the whole "free-software keep-both-parts-if-you-break-it get-what-you-paid-for" thing, I've been involved in free software since before Linux was 1.0 and I've been running (and writing stuff for) Nix systems for a few years too, so I'm not demanding that anyone stop what they're doing and fix my shit for free. I'm just a bit surprised at the apparent lack of polish in an area that I thought was a focus for a non-zero number of Nix folk.
also (full disclosure) I am tired and cranky because it's almost midnight and so is my 2yo child, and there is also something wrong with my mqtt broker or the way I expect it to work because it seems to be dropping all my test messages on the floor.
@dan Yeah that also surprises me. I use some Haskell software day to day and I need to put some nontrivial amount of work into fixing broken haskell packages, as I'd otherwise couldn't upgrade my system.
net-mqtt is marked as broken. Nix (or Stackage) doesn’t fix unmaintained packages. Someone else needs to fix them when devs don’t have time to do it (especially during GHC bump).
I used Haskell from cabal, stack, cabal new*, pacman (habs), debian and so on. If you find Haskell on Nix/Guix not optimal then try other options and wait for a GHC bump ;)
@erictapen @dan ps sometimes when a leaf package is simple all what we need to do is
nix-shell -p "haskellPackages.ghcWithPackages (pkgs: [haskell.lib.doJailbreak pkgs.net-mqtt])"
or even allowBroken when a flagged package was fixed in its latest version but Nix maintainers forgot to untick it ((un)marking broken is a manual process).