!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

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


SenderMessageTime
25 Jul 2025
@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

Show newer messages


Back to Room ListRoom Version: 6