!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

681 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 infrastructure134 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
7 Sep 2025
@emilazy:matrix.orgemilyif you could get bootstrap via Hugs upstreamed to MicroHs and ensure that Hugs builds okay with modern C compilers, then I wonder what it would take to Hugs -> MicroHs + MicroCabal added as an option for the Nixpkgs Haskell package set. (where presumably very little would work, but it would at least be tantalizing incentive to working on closing the gap between that and GHC)21:36:12
@maralorn:maralorn.demaralorn

What are my old and tired eyes seeing?

┃        > Encountered missing or private dependencies:
┃        >     cabal-add >=0.1 && <0.2 (installed: 0.2)

Look at the installed. I have been wishing for that feature for years and have been procrastinating to implement it basically the same time.

21:36:26
@maralorn:maralorn.demaralornThis is amazing.21:37:05
@alex:tunstall.xyzAlex
In reply to @emilazy:matrix.org
did you have to patch it for Hugs support?
Nope, this is already something Lennart has sorted out.
Though I did, amusingly, have to patch Hugs because it was broken in the Nixpkgs commit I started from (someone else wrote that patch, so no effort on my part).
21:38:44
@alex:tunstall.xyzAlex
In reply to @emilazy:matrix.org
have you talked with Lennart about this?
I don't think so, but I will try and upstream whatever improvements/fixes I make along the way.
(And I expect there to be a lot.)
21:39:19
@emilazy:matrix.orgemilywell AIUI the upstream build system either compiles the C blob or uses GHC right?21:43:23
@emilazy:matrix.orgemilyso adding a path to bootstrap via Hugs would be a good step21:43:36
@emilazy:matrix.orgemilyand yeah, having to keep Hugs working is part of the burden here...21:44:03
@emilazy:matrix.orgemilyas C codebases unmaintained for 20 years are no fun to keep going21:44:20
@alex:tunstall.xyzAlex
In reply to @emilazy:matrix.org
well AIUI the upstream build system either compiles the C blob or uses GHC right?
Not necessarily: https://github.com/augustss/MicroHs?tab=readme-ov-file#bootstrapping-with-hugs
(I also delete the C blobs to be extra sure I don't accidentally use them.)
21:45:29
@emilazy:matrix.orgemilyah. but that's a separate branch of MicroHs?21:46:21
@emilazy:matrix.orgemilyseems like it'd be ideal for it to be merged with the main one but I guess worst case it's just another hop21:46:43
@alex:tunstall.xyzAlex Yes, it's another hop, but the MicroHs build is under 5min anyway, so I'm not concerned.
It's a good idea to build a stage 2 mhs anyway.
21:53:37
@emilazy:matrix.orgemilyI do worry a bit about the part where he says the resulting binaries are 10x slower than GHC.21:55:36
@emilazy:matrix.orgemilyit's not exactly fast to bootstrap GHC to begin with21:55:49
@emilazy:matrix.orgemilybut I guess targeted optimization work could be applied21:56:08
8 Sep 2025
@romildo:matrix.orgromildo joined the room.21:04:44
@romildo:matrix.orgromildo

I want to install IHaskell with access to the System.Random package, as Jupyter kernel (on NixOS unstable). I have tried the following, without success:

$ nix-shell -p python313Packages.jupyter-client '(ihaskell.override { packages = (ps: with ps; [ random ]); })'

$ ihaskell install

$ jupyter kernelspec list
Available kernels:
  python3    /nix/store/452p7spwcycp694vd791hw2c2a2kl5c5-ihaskell-with-packages/lib/python3.13/site-packages/ipykernel/resources
  haskell    /home/romildo/.local/share/jupyter/kernels/haskell

$ jupyter console --kernel haskell
Jupyter console 6.6.3

IHaskell 0.11.0.0 GHC 9.8.4
In [1]: import System.Random
   ...:     
<interactive>:1:1: error: [GHC-87110]
    Could not find module ‘System.Random’.
    Use -v to see a list of the files searched for.

In [2]:

Can anyone help me with this?

21:16:33
@romildo:matrix.orgromildo *

I want to install IHaskell with access to the System.Random package, as a Jupyter kernel (on NixOS unstable). I have tried the following, without success:

$ nix-shell -p python313Packages.jupyter-client '(ihaskell.override { packages = (ps: with ps; [ random ]); })'

$ ihaskell install

$ jupyter kernelspec list
Available kernels:
  python3    /nix/store/452p7spwcycp694vd791hw2c2a2kl5c5-ihaskell-with-packages/lib/python3.13/site-packages/ipykernel/resources
  haskell    /home/romildo/.local/share/jupyter/kernels/haskell

$ jupyter console --kernel haskell
Jupyter console 6.6.3

IHaskell 0.11.0.0 GHC 9.8.4
In [1]: import System.Random
   ...:     
<interactive>:1:1: error: [GHC-87110]
    Could not find module ‘System.Random’.
    Use -v to see a list of the files searched for.

In [2]:

Can anyone help me with this?

21:16:47
9 Sep 2025
@maralorn:maralorn.demaralornIsn't random a core package?06:46:21
@julm:matrix.org@julm:matrix.org joined the room.11:06:06
@julm:matrix.org@julm:matrix.org left the room.11:06:49
@bglgwyng:matrix.orgbglgwyng Is ${pkgs.cabal-install}/bin/cabal wrapped to use the specific ghc binary? I just read the script and I don't think so. However, I have considered it working as expected, using package db configured in pkgs.haskellPackages.ghc, each time I run cabal build things in the shell. 14:52:33
@bglgwyng:matrix.orgbglgwyng hmm... does it just use ghc in PATH? And it has been ok since I always put pkgs.ghc together with pkgs.cabal-install in the shell? 14:55:19
@maralorn:maralorn.demaralornIt uses the PATH, pretty sure.15:35:10
@artem.types:matrix.orgArtemnot currently; judging by the master table, https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history, it was on and off untill GHC 8.4.4 when it was dropped and never picked up since. This sounds funny of course.16:37:18
@artem.types:matrix.orgArtem* not currently; judging by the master table, https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history, it was on and off untill GHC 8.4.3 when it was dropped and never picked up since. This sounds funny of course.16:38:10
@maralorn:maralorn.demaralorn Artem: Seems a bit … random. 🤪 18:04:21
@ashinnv:matrix.orgMagnolia Mayhem changed their profile picture.22:16:18

Show newer messages


Back to Room ListRoom Version: 6