!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

573 Members
125 Servers

Load older messages


SenderMessageTime
17 Jun 2025
@alexfmpe:matrix.orgalexfmpemaybe https://github.com/NixOS/nixpkgs/pull/380342 ?00:57:17
@alexfmpe:matrix.orgalexfmpe *
> pkgsCross.aarch64-android-prebuilt.stdenv.hostPlatform.isAndroid
true
> pkgsCross.aarch64-android-prebuilt.pkgsStatic.stdenv.hostPlatform.isAndroid
false

(╯° °)╯︵ ┻━┻)

00:57:27
@alexfmpe:matrix.orgalexfmpe *
> pkgsCross.aarch64-android-prebuilt.stdenv.hostPlatform.isAndroid
true
> pkgsCross.aarch64-android-prebuilt.pkgsStatic.stdenv.hostPlatform.isAndroid
false

(╯° °)╯︵ ┻━┻

02:10:58
@emilazy:matrix.orgemilyyes, they don't nest06:09:20
@emilazy:matrix.orgemilyjust invoke Nixpkgs with a custom platform defining the things you need06:09:25
@emilazy:matrix.orgemily the pkgsFoos are really just convenience helpers 06:09:35
@emilazy:matrix.orgemily import nixpkgs { localSystem = …; crossSystem = …; } is the true interface 06:09:45
@emilazy:matrix.orgemily lib.systems.examples.aarch64-android-prebuilt // { isStatic = true; } should do it 06:11:07
@emilazy:matrix.orgemilyno guarantees it works at all06:11:10
@alexfmpe:matrix.orgalexfmpeyeah I know we can manually specify the system, it's just a bit of a trap that the convenience helpers evaluate without error but with inconsistent config06:36:58
@alexfmpe:matrix.orgalexfmpepkgsCross.aarch64-android-prebuilt.pkgsStatic.hello works on my phone just right06:37:21
@alexfmpe:matrix.orgalexfmpe* since pkgsCross.aarch64-android-prebuilt.pkgsStatic.hello works on my phone 06:37:51
@emilazy:matrix.orgemilyit's unfortunate yeah06:42:35
@emilazy:matrix.orgemilyit's non-trivial to fix though06:42:38
@jopejoe1:matrix.orgjopejoe1 (4094@epvpn) changed their display name from jopejoe1 (4094@eh22) to jopejoe1 (4094@GPN23).12:07:05
18 Jun 2025
@dramforever:matrix.orgdramforever

is make nconfig in linux.configEnv supposed to work? i get

*
* Unable to find the ncurses package.
* Install ncurses (ncurses-devel or libncurses-dev
* depending on your distribution).
*
* You may also need to install pkg-config to find the
* ncurses installed in a non-default location.
*
make[2]: *** [scripts/kconfig/Makefile:234: scripts/kconfig/nconf-libs] Error 1
06:10:29
@dramforever:matrix.orgdramforever *

is make nconfig in linux.configEnv supposed to work for cross? i get

*
* Unable to find the ncurses package.
* Install ncurses (ncurses-devel or libncurses-dev
* depending on your distribution).
*
* You may also need to install pkg-config to find the
* ncurses installed in a non-default location.
*
make[2]: *** [scripts/kconfig/Makefile:234: scripts/kconfig/nconf-libs] Error 1
06:10:36
@dramforever:matrix.orgdramforever

oh i actually figured it out, this

            configEnv = finalAttrs.finalPackage.overrideAttrs (previousAttrs: {
              nativeBuildInputs =

should be depsBuildBuild

06:32:15
@rosssmyth:matrix.orgrosssmyth

I've been doing some work toward cross-compiling for MSVC. Mainly because I have some software I build at work that I build for Linux and mingw, but MSVC would be preferable for interop with other software we have. Got some basic stuff going.

  1. Create essentially a fetcher for the SDK
  2. Download the SDK and fix it up
  3. Wrap clang-cl
  4. Wrap rustc

Can compile hello world. I've not tested it on anything more complicated yet.
https://github.com/RossSmyth/msvcNix

18:05:20
@lukas.voreck:matrix.studverthi.deLukas(THI) changed their display name from Lukas Voreck to Lukas(THI).22:19:46
19 Jun 2025
@greg:thehellings.comGreg Hellings Hey y'all, cross-compiling pkgsCross.ucrtAarch64.stdenv.cc for Windows on Arm has been broken for about a month. A quick bisect points to commit 4f8431266ce9a84b5c524a310e931681b2d7db5a 04:27:43
@greg:thehellings.comGreg Hellings Seems to make sense, as that change specifically creates a symlink between libunwind.so and libgcc_s.so files, which are notably absent in the ucrtAarch64 target, as it is a purely LLVM environment with no gcc present 04:29:07
@greg:thehellings.comGreg Hellings Nope, looks like the problem is the file paths. Windows keeps its shared libraries under /bin/ with a .dll extension whereas on other platforms they tend to be .so files in /lib/ 04:38:50
@dramforever:matrix.orgdramforeverhttps://github.com/NixOS/nixpkgs/pull/41775707:18:31
@fliegendewurst:matrix.orgFliegendeWurst changed their display name from FliegendeWurst to FliegendeWurst (@GPN23).12:29:29
20 Jun 2025
@greg:thehellings.comGreg Hellingshttps://github.com/NixOS/nixpkgs/pull/41805413:07:56
@thenextusername:matrix.orgthenextusername joined the room.14:15:51
22 Jun 2025
@ss:someonex.netSomeoneSerge (back on matrix) changed their display name from SomeoneSerge (UTC+U[-12,12]) to SomeoneSerge (Ever OOMed by Element).12:13:58
@pakt:nope.chat@pakt:nope.chat joined the room.21:37:44
@pakt:nope.chat@pakt:nope.chat 21:44:08

Show newer messages


Back to Room ListRoom Version: 6