!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

745 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.org149 Servers

Load older messages


SenderMessageTime
30 Apr 2026
@alexfmpe:matrix.orgalexfmpeif so, should we, I dunno, patch the vincent package to rename the symbol?20:52:23
@alexfmpe:matrix.orgalexfmpe
In reply to @alexfmpe:matrix.org
if so, should we, I dunno, patch the vincent package to rename the symbol?
FWIW this worked locally
22:18:17
@winston:winston.shwinston heya, I only just saw the recent-ish merge of the microhs changes, thanks for the work on that! ❤️
I think I've read up on the PR, but will hugs be the way microhs is getting build in the foreseeable future? I'm trying to add an override to get the mhseval binary to build, and was trying to understand the build process. Am I seeing this correctly that building with hugs currently closes off the possibility of building mhseval/mhseval.js?
https://github.com/augustss/MicroHs/blob/master/mhs/MhsEval.hs
22:54:07
@alex:tunstall.xyzAlex

Yes, building with Hugs is currently the preferred way because it does not depend on any pre-generated code.
The stage 1 build uses a pre-existing mhs (usually runhugs wrapped mhs) with make.
The stage 2 build uses the stage 1 mhs with mcabal.

It's not immediately obvious to me how exactly mhseval.js is generated, but is there any reason you can't generate it using the stage 1 or stage 2 compiler?

23:37:10
@alex:tunstall.xyzAlexSince it seems to be a separate output, I would recommend using a different derivation instead of overriding the existing ones.23:39:01
@winston:winston.shwinston

I was trying to get it to work via

mhseval = pkgs.haskell.compiler.microhs.overrideAttrs (prevAttrs: {
  microhs-stage1 = prevAttrs.passthru.microhs-stage1.overrideAttrs {
    nativeBuildInputs = [ pkgs.breakpointHook ];
    postBuild = ''
      make bin/mhseval
    '';
    postInstall = ''
      cp bin/mhseval $out/bin/mhseval
    '';
  };
});

and didn't manage to get a useful output that way, I did try to copy it from stage1 to stage2 later, but I've changed a bunch of code around this

23:39:42
@winston:winston.shwinston currently I'm just doing a mkDerivation inheriting from src etc from pkgs.haskell.compiler.microhs, then postInstall'ing mhseval, so that works 23:40:24
@alex:tunstall.xyzAlex Is your ultimate desired hostPlatform one of the JS platforms? 23:40:37
@winston:winston.shwinstonnot doing JS at the minute, so I haven't tried that yet, I just anticipate that there'll be some interest for that as well23:41:07
@alex:tunstall.xyzAlex The other problem here is that mhseval is not in the Cabal file, so naturally the stage 2 build won't include it either. 23:48:31
@alex:tunstall.xyzAlex Unless JS is supported as a buildPlatform, I think it might be best to first make microhs compatible with cross.
I'm not sure what's missing for cross, but I suspect it has to do with the targetPlatform not being passed to the build.
23:51:42
1 May 2026
@alex:tunstall.xyzAlexWell, cross isn't terribly difficult. I've just gotten it working.00:46:32
20 May 2021
@grahamc:nixos.org@grahamc:nixos.org set the history visibility to "world_readable".22:10:58
@grahamc:nixos.org@grahamc:nixos.org changed the room name to "" from "".22:10:58
@grahamc:nixos.org@grahamc:nixos.org invited @maralorn:maralorn.demaralorn.22:11:05
@maralorn:maralorn.demaralorn joined the room.22:11:13
@andi:kack.itandi- joined the room.22:30:49
@grahamc:nixos.org@grahamc:nixos.orgchanged room power levels.22:36:42
Room Avatar Renderer.22:46:20
@maralorn:maralorn.demaralorn changed the join rule to "public" from "public".22:54:26
@maralorn:maralorn.demaralorn changed the room topic to "For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/" from "For discussions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/".22:56:19
@server_stats:nordgedanken.devServer Stats Discoverer (traveler bot) joined the room.23:05:49
@pennae:matrix.eno.spacepennae joined the room.23:06:26
@justinrestivo:matrix.orgjustinrestivo joined the room.23:07:39
@srid:matrix.orgsrid joined the room.23:07:41
@_xmpp_qy=40xa0.uk:matrix.orgbqv joined the room.23:08:26
@_xmpp_qy=40xa0.uk:matrix.orgbqv changed their display name from qy to bqv.23:08:27
@_xmpp_qy=40xa0.uk:matrix.orgbqv changed their display name from bqv to qy.23:08:28
@_xmpp_qy=40xa0.uk:matrix.orgbqv changed their display name from qy to bqv.23:08:29
@ryantm:matrix.orgryantm joined the room.23:18:05

Show newer messages


Back to Room ListRoom Version: 6