!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

718 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 infrastructure142 Servers

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


SenderMessageTime
18 Mar 2026
@alexfmpe:matrix.orgalexfmpe* https://github.com/libffi/libffi/blob/master/src/loongarch64/ffitarget.h#L39 https://github.com/libffi/libffi/blob/master/src/mips/ffitarget.h#L57 https://github.com/libffi/libffi/blob/master/src/riscv/ffitarget.h#L3604:37:11
@alexfmpe:matrix.orgalexfmpe *
$ nix-build -A pkgsCross.loongarch64-linux.haskellPackages.ghc
error: In file included from /nix/store/kn3j1mjbcj7w39h0s0wgxxhchw3gg56f-libffi-loongarch64-unknown-linux-gnu-3.5.2-dev/include/ffi.h:84,
                 from FFI.hsc:33:
/nix/store/kn3j1mjbcj7w39h0s0wgxxhchw3gg56f-libffi-loongarch64-unknown-linux-gnu-3.5.2-dev/include/ffitarget.h:38:2: error: #error "libffi was configured for a LoongArch target but this does not appear to be a LoongArch compiler."
$ nix-build -A pkgsCross.mips64-linux-gnuabi64.haskellPackages.ghc 
error: In file included from /nix/store/8q1grm46k375rmfmbzvsxnhzbakksf6n-libffi-mips64-unknown-linux-gnuabi64-3.5.2-dev/include/ffi.h:84,
                 from FFI.hsc:33:
/nix/store/8q1grm46k375rmfmbzvsxnhzbakksf6n-libffi-mips64-unknown-linux-gnuabi64-3.5.2-dev/include/ffitarget.h:57:3: error: #error -- something is very wrong --
   57 | # error -- something is very wrong --
      |   ^~~~~
04:38:46
@alexfmpe:matrix.orgalexfmpe *
$ nix-build -A pkgsCross.loongarch64-linux.haskellPackages.ghc
error: In file included from /nix/store/kn3j1mjbcj7w39h0s0wgxxhchw3gg56f-libffi-loongarch64-unknown-linux-gnu-3.5.2-dev/include/ffi.h:84,
                 from FFI.hsc:33:
/nix/store/kn3j1mjbcj7w39h0s0wgxxhchw3gg56f-libffi-loongarch64-unknown-linux-gnu-3.5.2-dev/include/ffitarget.h:38:2: error: #error "libffi was configured for a LoongArch target but this does not appear to be a LoongArch compiler."
   38 | #error \
      |  ^~~~~
/nix/store/kn3j1mjbcj7w39h0s0wgxxhchw3gg56f-libffi-loongarch64-unknown-linux-gnu-3.5.2-dev/include/ffitarget.h:66:2: error: #error unsupported LoongArch base architecture
   66 | #error unsupported LoongArch base architecture
      |  ^~~~~
$ nix-build -A pkgsCross.mips64-linux-gnuabi64.haskellPackages.ghc 
error: In file included from /nix/store/8q1grm46k375rmfmbzvsxnhzbakksf6n-libffi-mips64-unknown-linux-gnuabi64-3.5.2-dev/include/ffi.h:84,
                 from FFI.hsc:33:
/nix/store/8q1grm46k375rmfmbzvsxnhzbakksf6n-libffi-mips64-unknown-linux-gnuabi64-3.5.2-dev/include/ffitarget.h:57:3: error: #error -- something is very wrong --
   57 | # error -- something is very wrong --
      |   ^~~~~
04:41:10
@woobilicious:matrix.orgwoobiliciousI have a questions about the general architecture of haskellPackages, does hackage have dep cycles? and how do you deal with them when generating the package list? I'm working on a little project that generates a package list from a foreign source, but it has cycles, and I'm kinda clueless on how to break cycles up without just removing all dependencies04:49:25
@alex:tunstall.xyzAlex Cross-compiling GHC 9.6+ shouldn't even eval, because of a throw sterni added after we found that Hadrian broke cross. Is there some difference between haskellPackages.ghc and haskell.compiler.ghc? 05:40:55
@alex:tunstall.xyzAlex

I have not seen anything that suggests that Cabal supports cycles, but you may want to try it out and see whether the dependency solver likes it.

But regardless of what Haskell is doing, I think you would be better off looking at how existing tools that work with the foreign source handle those cycles, since doing the same thing will give your tooling the best chance at doing no worse with weird scenarios you've yet to consider.

05:46:36
@alexfmpe:matrix.orgalexfmpeNot for native 05:46:36
@alexfmpe:matrix.orgalexfmpe
In reply to @alexfmpe:matrix.org
Not for native
One is cross compiler ghc, the other is cross compiled ghc
05:47:31
@alex:tunstall.xyzAlex Right, so haskellPackages.ghc is the same as buildPackages.ghc? 05:48:13
@alexfmpe:matrix.orgalexfmpe
In reply to @woobilicious:matrix.org
I have a questions about the general architecture of haskellPackages, does hackage have dep cycles? and how do you deal with them when generating the package list? I'm working on a little project that generates a package list from a foreign source, but it has cycles, and I'm kinda clueless on how to break cycles up without just removing all dependencies
You can have package cycles, just not component cycles. For packages A,B it's valid to have libA <- libB <- testA
05:50:04
@alexfmpe:matrix.orgalexfmpeIn cabal packages that is05:50:24
@alexfmpe:matrix.orgalexfmpehaskellPackages in particular is 'wrong' in that it generates one derivation per package, not per component05:50:54
@alexfmpe:matrix.orgalexfmpeSo we have to manually break cycles for a bunch of test packages with dontCheck05:51:15
@alexfmpe:matrix.orgalexfmpeSearch for 'cycle' or so in configuration-common.nix for examples05:51:40
@alexfmpe:matrix.orgalexfmpe`nix-build --show-trace` can help find specific cycles since it shows the call stack05:52:47

Show newer messages


Back to Room ListRoom Version: 6