!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

679 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
25 Sep 2025
@toonn:matrix.orgtoonn The different hashes do seem to indicate that they're different instances of the package, no? 11:37:01
@bglgwyng:matrix.orgbglgwyngYes they are different11:40:57
@bglgwyng:matrix.orgbglgwyngI wonder if generic-builder can distinguish them during build11:41:25
@maralorn:maralorn.demaralorn

bglgwyng: I am not 100% sure but from my experience: Cabal will prefer the overriden one over the default except in the following situations:

  1. Some dependency is already using the default and none the override. (i.e. the only way to get a coherent build plan.)
  2. There is a constraint which prevents usage of the overriden one.

But this is really murky and I could be wrong.

11:54:31
@sternenseemann:systemli.orgsterni bglgwyng: the issue appears to be that you are building random with different versions of splitmix in these cases 11:58:24
@sternenseemann:systemli.orgsterniso you need to make sure that the splitmix version is consistent as well11:58:33
@bglgwyng:matrix.orgbglgwyngah, I'll figure out why 2 random packages are built, but in my case, build with duplicated packages should work well since I explicitly override them by plan.json result11:59:48
@bglgwyng:matrix.orgbglgwyngI suppose that we don't have force generic-builder to use a specific package with id12:00:43
@bglgwyng:matrix.orgbglgwyng* I suppose that we don't have a way to force generic-builder to use a specific package with id12:01:26
@maralorn:maralorn.demaralornI think Setup.hs has a mode to do that. But we currently don’t use it in the generic-builder and it might be non trivial.12:02:16
@bglgwyng:matrix.orgbglgwyngThanks! but, wht does 'non trivial' mean here?12:03:04
@maralorn:maralorn.demaralornIt means, that it could be that a) if you do this you need to specify the hashes of all dependencies (and I think in that mode you disable bound checking completely) and b) it might be hard to figure out the correct hashes to inject there. Basically we would be reimplementing logic which we currently rely on from Setup.hs.12:12:26
@maralorn:maralorn.demaralornDoes not sound insurmantable.12:12:47
@maralorn:maralorn.demaralornIt might even be feasible do improve the generic-builder to enforce the usage of passed in overrides more reliably in general. That could be cool.12:13:28
@maralorn:maralorn.demaralorn* Does not sound insurmountable.12:13:43
@sternenseemann:systemli.orgsternihttps://cabal.readthedocs.io/en/stable/setup-commands.html#cmdoption-runhaskell-Setup.hs-configure-dependency15:26:31
@maralorn:maralorn.demaralornAh, nice.15:27:13
@maralorn:maralorn.demaralornThat’s less complicated than what I had in mind.15:27:28
@sternenseemann:systemli.orgsterniI think the problem here is figuring out the right installed package identifier. I believe how this is computed is pretty much internal to Cabal 15:27:35
@maralorn:maralorn.demaralorn You can most certainly not know it a nix eval time. So you will probably need to do some finding through build inputs. 15:28:33
26 Sep 2025
@bglgwyng:matrix.orgbglgwyng Maybe I'm doing something hacky so I want to convince my self;
did the same thing happen when we tried to override a pakcage with the same version in haskell.packages and different transitive dependencies?
03:28:54
@bglgwyng:matrix.orgbglgwyngyes this worked03:41:00
@aspendowntime:matrix.org@aspendowntime:matrix.org removed their profile picture.05:46:41
@aspendowntime:matrix.org@aspendowntime:matrix.org removed their display name Eden (they/it/she).05:47:00
@aspendowntime:matrix.org@aspendowntime:matrix.org left the room.05:47:41
@bglgwyng:matrix.orgbglgwyng Where is pkgsHostTarget passed from?
https://github.com/NixOS/nixpkgs/blob/5364a5ff96df5c2e3b1048914f90fc39530087c2/pkgs/development/haskell-modules/generic-builder.nix#L641
09:28:48
@sternenseemann:systemli.orgsternipkgs/stdenv/generic/setup.sh09:51:35
@sternenseemann:systemli.orgsterni yes this also happens in that case, hence you need to overrideScope 09:52:08

Show newer messages


Back to Room ListRoom Version: 6