!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

746 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
26 Apr 2026
@alexfmpe:matrix.orgalexfmpea more heavy handed workaround mentioned in there involves a flag to decide whether to specify build-tool-depends so you can skip it when using shellFor and let cabal get it from path there14:15:14
@alexfmpe:matrix.orgalexfmpenix-build worked for me on your repo, it's the integration between shellFor and cabal-install where things go wrong14:15:49
@andromeda:tchncs.deandromeda
In reply to @alexfmpe:matrix.org
hackage.nix lets you take cabal.project into account, and also use the solver, but it's an entirely different beast
what makes that an entirely different beast?
14:17:44
@alexfmpe:matrix.orgalexfmpehttps://input-output-hk.github.io/haskell.nix/motivation.html#comparison-with-nixpkgs14:18:25
@alexfmpe:matrix.orgalexfmpethat's somewhat outdated, it's not necessarily better for cross, but the rest stands14:19:00
@andromeda:tchncs.deandromeda that... seems like overkill. I'mma go with keeping the cabal.project in sync enough with the flake. 14:21:01
@sternenseemann:systemli.orgsterni (he/him)cabal-install v2 commands expect build-tool-depends to be registered in the package db which Nix environments don't do because it is wrong from the perspective of the dependency separation: build tools go to nativeBuildInputs and not into (propagated)BuildInputs. Only the latter get folded into the package db. There is an open issue about this. Only affects developer environments. Easiest workaround is to use the cabal-install v1 commands which check PATH for tools as well.14:33:49
@sternenseemann:systemli.orgsterni (he/him)ah alex already answered, nvm.14:34:29
@sternenseemann:systemli.orgsterni (he/him) aiya: I bumped Hackage two days ago, you can follow the progress there: https://github.com/NixOS/nixpkgs/pull/510883. Giving a timeline is hard, but the answer is weeks unfortunately at the moment. 14:36:14
@aiya:catgirl.cloudaiya sterni i see, so maybe it is worth fixing, could you please elaborate on your latest comment here (https://github.com/NixOS/nixpkgs/pull/506489#discussion_r3110806985)? apologies, i don't fully understand it 20:02:42
27 Apr 2026
@ashinnv:matrix.org👿👿👿M̸̙̜̔̇Ǎ̴͎̙͔G̸̞̈N̸͔͍̝͗͋̾Ő̷͖̼͈̽̚L̷̻͚̓̔I̷̛͔̰̟̔Å̴̩̍ ̷̦̒̇͝M̷̱̠̺̉̎A̵̼̎͗͘Ỹ̸̬̲͂̕H̷̙̖͂Ē̷͉̦̌͒M̶͈̥̽̐ 👹👹👹👹😈😈😈 changed their display name from M̸̙̜̔̇Ǎ̴͎̙͔G̸̞̈N̸͔͍̝͗͋̾Ő̷͖̼͈̽̚L̷̻͚̓̔I̷̛͔̰̟̔Å̴̩̍ ̷̦̒̇͝M̷̱̠̺̉̎A̵̼̎͗͘Ỹ̸̬̲͂̕H̷̙̖͂Ē̷͉̦̌͒M̶͈̥̽̐ Houston, we've had a Microsoft to M̸̙̜̔̇Ǎ̴͎̙͔G̸̞̈N̸͔͍̝͗͋̾Ő̷͖̼͈̽̚L̷̻͚̓̔I̷̛͔̰̟̔Å̴̩̍ ̷̦̒̇͝M̷̱̠̺̉̎A̵̼̎͗͘Ỹ̸̬̲͂̕H̷̙̖͂Ē̷͉̦̌͒M̶͈̥̽̐.00:11:10
@ashinnv:matrix.org👿👿👿M̸̙̜̔̇Ǎ̴͎̙͔G̸̞̈N̸͔͍̝͗͋̾Ő̷͖̼͈̽̚L̷̻͚̓̔I̷̛͔̰̟̔Å̴̩̍ ̷̦̒̇͝M̷̱̠̺̉̎A̵̼̎͗͘Ỹ̸̬̲͂̕H̷̙̖͂Ē̷͉̦̌͒M̶͈̥̽̐ 👹👹👹👹😈😈😈 changed their display name from M̸̙̜̔̇Ǎ̴͎̙͔G̸̞̈N̸͔͍̝͗͋̾Ő̷͖̼͈̽̚L̷̻͚̓̔I̷̛͔̰̟̔Å̴̩̍ ̷̦̒̇͝M̷̱̠̺̉̎A̵̼̎͗͘Ỹ̸̬̲͂̕H̷̙̖͂Ē̷͉̦̌͒M̶͈̥̽̐ to 👿👿👿M̸̙̜̔̇Ǎ̴͎̙͔G̸̞̈N̸͔͍̝͗͋̾Ő̷͖̼͈̽̚L̷̻͚̓̔I̷̛͔̰̟̔Å̴̩̍ ̷̦̒̇͝M̷̱̠̺̉̎A̵̼̎͗͘Ỹ̸̬̲͂̕H̷̙̖͂Ē̷͉̦̌͒M̶͈̥̽̐ 👹👹👹👹😈😈😈.00:12:37
@psy1ynce:matrix.org@psy1ynce:matrix.org left the room.01:34:06
@ninja:worldethicaldataforum.orgNinja joined the room.14:26:22
@cat:antechamber.partycat joined the room.23:41:34
30 Apr 2026
@whomstcall:matrix.orgwhomstcall joined the room.07:52:14
@alexfmpe:matrix.orgalexfmpe

getting a duplicate symbol '_hourglass_clock_calendar' in: error when linking, but only on mac (or maybe it's a clang thing)
I'm assuming it's because this fork of a vincent package defines the same C function?

https://github.com/vincenthz/hs-hourglass/blob/master/cbits/unix.c#L16
https://github.com/mpilgrem/time-hourglass/blob/main/cbits/unix.c

20:45:12
@alexfmpe:matrix.orgalexfmpehuh it might be a gcc bug actually? https://stackoverflow.com/questions/64610024/duplicate-symbols-with-global-template-variable-using-clang20:48:37
@alexfmpe:matrix.orgalexfmpe* huh the fact it works on gcc might be a bug actually? https://stackoverflow.com/questions/64610024/duplicate-symbols-with-global-template-variable-using-clang20:48:53
@alexfmpe:matrix.orgalexfmpe* huh the fact it works on gcc might be a bug actually? https://stackoverflow.com/questions/64610024/duplicate-symbols-with-global-template-variable-using-clang20:48:56
@alexfmpe:matrix.orgalexfmpeare c-sources always exposed globally by GHC? can any two packages out there cause these collisions?20:51:31
@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

Show newer messages


Back to Room ListRoom Version: 6