!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

708 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/142 Servers

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


SenderMessageTime
25 Jul 2025
@aidalgol:matrix.orgaidalgol I need some help understanding this build failure from PR 424162. 06:12:38
@alex:tunstall.xyzAlex
In reply to @aidalgol:matrix.org
I need some help understanding this build failure from PR 424162.
It 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
@mangoiv.:matrix.orgMangoIV 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
@teoc:matrix.orgTeo (he/him) should be actual compiler, I can rebase my patch for ghc-9.12 13:03:01
@mangoiv.:matrix.orgMangoIV
In reply to @teoc:matrix.org
should be actual compiler, I can rebase my patch for ghc-9.12
I 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
@mangoiv.:matrix.orgMangoIV😌13:04:07
@mangoiv.:matrix.orgMangoIV
In reply to @mangoiv.:matrix.org
I 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
Okay so applying the patch didn’t do anything, still doesn’t build, with the same error, cc teo (they/he)
14:55:24
@teoc:matrix.orgTeo (he/him) thanks for looking! I'll look into this more at some point soon 14:57:21
@maralorn:maralorn.demaralornI 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
@maralorn:maralorn.demaralornBut 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
@emilazy:matrix.orgemily buildPackages is pkgsBuildBuild 01:56:32
@emilazy:matrix.orgemily packages that run on buildPlatform and target (when they are compilers) buildPlatform 01:56:44
@emilazy:matrix.orgemily so buildPackages.ghc should not compile for WASM 01:56:55
@emilazy:matrix.orgemilythere are some weirdnesses here though because some packages are "a level up"01:57:07
@emilazy:matrix.orgemily e.g. stdenv is odd 01:57:24
@emilazy:matrix.orgemily * e.g. stdenv.cc is odd 01:57:36
@emilazy:matrix.orgemilyagh!01:58:12
@emilazy:matrix.orgemily ok never mind I totally got my package sets mixed up. buildPackages is pkgsBuildHost :) 01:58:22
@emilazy:matrix.orgemily pkgsBuildBuild is used to build things for the build platform, pkgsBuildHost for the host platform 01:58:39
@emilazy:matrix.orgemily ("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 pkgsBuildHostbuildPackages – 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
@emilazy:matrix.orgemilywell… hopefully all that made things more confusing02:00:28
@emilazy:matrix.orgemilyanyway, 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 though02:00:50
@b:chreekat.netchreekatso where does a cross compiler fit into that? (How do you specify Target?)04:34:15
@aidalgol:matrix.orgaidalgol And then when I have a fix, do I create a PR to marge into haskell-updates? 04:49:29

Show newer messages


Back to Room ListRoom Version: 6