Nix Cross Compiling | 579 Members | |
| 126 Servers |
| Sender | Message | Time |
|---|---|---|
| 10 Feb 2025 | ||
| what's special about pkgsCross that causes __splicedPackages to contain the __spliced attribute but not the toplevel | 04:03:03 | |
| https://github.com/NixOS/nixpkgs/blob/f202c36babad2412fc20a061d56c1f378efa806d/pkgs/top-level/splice.nix#L181 | 04:03:36 | |
In reply to @rhelmot:matrix.orgtoplevel is just normal pkgs | 04:04:06 | |
| hmmk... so actuallySplice is adjacentPackages != null | 04:05:05 | |
| here's what I'm trying to do: I want to instantiate nixpkgs with localSystem = A and crossSystem = B, do some builds, transfer the closure onto a B machine, then do the same instantiation so that B doesn't have to do any heavy building of its own... but then import pkgs/build-support/trivial-builders/default.nix with a new stdenv which has both build and host as B so that B can do things like build config files. the problem I'm foreseeing is that it will try to splice its dependencies and end up with stuff that can only run on A. I've been struggling to construct a spliced package set that, well, effectively lies about what e.g. bash.__spliced.buildHost is and actually gives hostHost. | 05:14:25 | |
| the reason for this task: being able to build nixbsd installer images. A here is Linux and B here is e.g. OpenBSD which doesn't have a real stdenv and can't build anything natively | 05:16:16 | |
loongarch64's libgcc is broken: https://github.com/NixOS/nixpkgs/pull/381016 | 23:18:42 | |
| 12 Feb 2025 | ||
| 19:59:44 | ||
| 14 Feb 2025 | ||
| Hi, can anyone please help me how to get started on cross-compilation. Documentation is very confusing and scattered across multiple places. I want to get GHC compiler than can compile my Haskell code to both ARM64 Linux and ARM64 Android. However I do not know where to get started. I tried the following flake.nix
However
| 13:14:55 | |
| * Hi, can anyone please help me how to get started on cross-compilation. Documentation is very confusing and scattered across multiple places. I want to get GHC compiler than can compile my Haskell code to both ARM64 Linux and ARM64 Android. However I do not know where to get started. I tried the following flake.nix
However
| 13:16:14 | |
| Yeah, android has regressed quite a bit | 16:17:18 | |
| It worked a few years back, not sure to which extent | 16:17:27 | |
| For haskell I mean | 16:17:43 | |
| nobody really puts effort into maintaining Android and iOS upstream in Nixpkgs so they don't really work | 16:17:53 | |
| A few months ago I found some low hanging fruit and managed to build non TH libs | 16:18:04 | |
| https://github.com/NixOS/nixpkgs/pull/355543 | 16:18:06 | |
| But rebasing this on recent nixpkgs yielded the same results you're seeing | 16:18:24 | |
| You might want to try haskell.nix in the meantime | 16:19:00 | |
| I don’t even know what iOS support would look like in nixpkgs. Pretty much everything assumes Darwin = macOS. | 16:19:30 | |
| (I know there is/was some support, but it’s been broken for a while.) | 16:19:45 | |
| It’s also such a bad idea due to App Store rules. You’re better off using xcodenv. | 16:20:01 | |
In reply to @alexfmpe:matrix.orgLoathe as I am of perpetuating critical mass for company managed turfs | 16:20:22 | |
In reply to @reckenrode:matrix.orgI remember this debate happening a couple times but I don't think I'll be able to get acquainted enough to have an opinion on mobile until at least 8.10 ghcjs is dead | 16:23:09 | |
| At any rate the original question was for android, which seems more amenable and where there's more current progress | 16:24:04 | |
| iOS was mentioned, so I felt it was worth speaking up about. There is not a lot of available Darwin bandwidth. I’d rather not spend it on fringe use cases when there’s still a lot that can be done to improve the common case. | 16:29:20 | |
| fwiw still personally happy to mentor bringing iOS support up to date in line with my previous statements about how it should work :P | 17:20:06 | |
| I think if done right it would be cleanly-factored enough to not impose burden on macOS. and also it doesn't seem that hard to inject the Xcode toolchain as previously discussed, which should be entirely within the rules. though that should be a later project. | 17:20:40 | |
In reply to @emilazy:matrix.orgWe've got an Android team now so the effort is starting. | 17:25:21 | |
| 17:33:58 | ||
| Hello. I am trying to clean up my build process. I am attempting to use the
and then it is called with
This fails with the error
The build target is armv6m, and I am building on x86. Is there some way to provide it the info it needs? Note that if I instance a dedicated cross instance with
It almost works (it gets to the build stage but hits an error I've not seen with the arm-embedded compiler), but it requires compiling GCC from source. | 17:45:18 | |