Haskell in Nixpkgs/NixOS | 720 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.org | 143 Servers |
| Sender | Message | Time |
|---|---|---|
| 25 Jul 2025 | ||
Does cabal not support GHC2024 yet? | 00:12:13 | |
In reply to @mequbic:matrix.org
When I explicitly install a newer version using (Well "works": I get a different error, which could be resolved with changing | 05:49:07 | |
In reply to @le:4d2.org To have all of this in your shell.nix, change
to
| 05:55:45 | |
| I need some help understanding this build failure from PR 424162. | 06:12:38 | |
In reply to @aidalgol:matrix.orgIt looks like 8 test failures caused by an attempt to run a missing or not found program. Check the source code to see what it's trying to execute and try to add it to the test dependencies. Since these appear to be doctests, they might be failing because the build doesn't have the necessary tools to run doctests available. | 08:22:40 | |
| teo (they/he): which hadrian needs your patch? The boot compiler or the actual compiler? (the patch only applies to ghc 9.10 but not to 9.12...) | 10:59:43 | |
| should be actual compiler, I can rebase my patch for ghc-9.12 | 13:03:01 | |
In reply to @teoc:matrix.orgI fear then it won’t apply to earlier versions. Building with ghc 9.10 but can only continue when my laptop is idle because while it’s building GHCs it’s unusable | 13:04:03 | |
| 😌 | 13:04:07 | |
In reply to @mangoiv.:matrix.orgOkay so applying the patch didn’t do anything, still doesn’t build, with the same error, cc teo (they/he) | 14:55:24 | |
| thanks for looking! I'll look into this more at some point soon | 14:57:21 | |
| I would like to conceptually grok how cross-compilation works in nixpkgs. My understanding is that "buildPackages" is meant to contain build outputs which are meant to be used on the build system, and they can be used to produce build outputs meant to be run on the target system. What I am wondering is this: When we want to cross-compile to wasm then we need to take a ghc which has wasm als compile target. But that ghc I think runs on the build system and thus belongs to buildPackages right? But when we replace the ghc in buildPackages with a wasm-targeting one, then those haskellBuildPackages are kinda broken because they should be compiled for and usable on the build plattform, so "replacing" the ghc is kinda wrong is it? I am asking because I am trying to understand this line: https://github.com/ners/nix-wasm/blob/795efcfb8f8e98d7084be5da354cbe850f5834da/flake.nix#L48 Which works, but it does e.g. lead to ghcWithPackages not working for wasm cross. | 23:24:27 | |
| But of course the error might be somewhere else. This has all so many moving parts and I am trying to learn the concepts. | 23:25:19 | |
| 26 Jul 2025 | ||
buildPackages is pkgsBuildBuild | 01:56:32 | |
packages that run on buildPlatform and target (when they are compilers) buildPlatform | 01:56:44 | |
so buildPackages.ghc should not compile for WASM | 01:56:55 | |
| there are some weirdnesses here though because some packages are "a level up" | 01:57:07 | |
e.g. stdenv is odd | 01:57:24 | |
* e.g. stdenv.cc is odd | 01:57:36 | |
| agh! | 01:58:12 | |
ok never mind I totally got my package sets mixed up. buildPackages is pkgsBuildHost :) | 01:58:22 | |
pkgsBuildBuild is used to build things for the build platform, pkgsBuildHost for the host platform | 01:58:39 | |
("target platform" is only relevant from the perspective of a compiler. you should usually be talking about "build platform" and "host platform". from the perspective of pkgsFooBar.someCompiler, the consumer's Foo platform is the compiler's buildPlatform and hostPlatform, and the consumer's Bar platform is the compiler's targetPlatform. e.g. if you use pkgsBuildHost – buildPackages – in a package, and select a compiler from it, that compiler will have compiler's buildPlatform = your buildPlatform, compiler's hostPlatform = your buildPlatform, compiler's targetPlatform = your hostPlatform) | 02:00:15 | |
| well… hopefully all that made things more confusing | 02:00:28 | |
| anyway, it may be that the Haskell package set gets cross/splicing wrong in ways that make things weird. I've seen some hints of that in the past. not sure though | 02:00:50 | |
| so where does a cross compiler fit into that? (How do you specify Target?) | 04:34:15 | |
And then when I have a fix, do I create a PR to marge into haskell-updates? | 04:49:29 | |
In reply to @aidalgol:matrix.orgYes | 07:27:06 | |
| Leaving out the confusing mess that is splicing, cross starts by setting So with WASM, | 07:40:16 | |
In reply to @maralorn:maralorn.de
The | 08:00:57 | |