!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

556 Members
119 Servers

Load older messages


SenderMessageTime
24 Aug 2025
@artturin:matrix.orgArtturinThen you can use mkScopeWithSplicing because the set will be available top-level12:24:03
@artturin:matrix.orgArtturin* Then you can use makeScopeWithSplicing' because the set will be available top-level12:24:50
@artturin:matrix.orgArtturinYou don't necessarily need a scope12:28:13
@artturin:matrix.orgArtturinUse overlays and callPackage to get deps, then you don't have to do anything non-cross specific unless the package itself needs something12:28:39
@artturin:matrix.orgArtturin* Use overlays and callPackage to get deps, then you don't have to do anything cross specific unless the package itself needs something12:28:55
@limwa:matrix.orgAndré LimaThat's very helpful, thanks12:33:44
@artturin:matrix.orgArtturin* Define your packages in an overlay and use callPackage in the overlay to get deps, then you don't have to do anything cross specific unless the package itself needs something12:34:05
@emilazy:matrix.orgemily I think you can use it without an overlay if you use splice.nix right? 12:56:45
@artturin:matrix.orgArtturinsplice.nix doesn't help with that12:59:48
@artturin:matrix.orgArtturin You can get otherSplices without an overlay if you use all the different callPackages yourself 13:00:15
@emilazy:matrix.orgemily it provides a generateSplicesForMkScope you can use with makeScopeWithSplicing' right? but I guess the problem is mixing in stuff from the main package set… 13:00:19
@artturin:matrix.orgArtturin generateSplicesForMkScope gets from pkgsBuildBuild and so on 13:00:39
@artturin:matrix.orgArtturin
selfBuildBuild = lib.attrByPath (split "pkgsBuildBuild") bad pkgs;
selfBuildHost = lib.attrByPath (split "pkgsBuildHost") bad pkgs;
selfBuildTarget = lib.attrByPath (split "pkgsBuildTarget") bad pkgs;
selfHostHost = lib.attrByPath (split "pkgsHostHost") bad pkgs;
selfHostTarget = lib.attrByPath (split "pkgsHostTarget") bad pkgs;
selfTargetTarget = lib.attrByPath (split "pkgsTargetTarget") { } pkgs;
13:00:48
@emilazy:matrix.orgemilyI really wish we could have generic builder functions for compiler scopes that can be used out-of-tree to produce correct cross results without an overlay13:00:50
@artturin:matrix.orgArtturin Used like this otherSplices = generateSplicesForMkScope "xfce"; 13:01:58
@artturin:matrix.orgArtturin * For example, the xfce set uses it like this otherSplices = generateSplicesForMkScope "xfce"; 13:04:10
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @emilazy:matrix.org
I really wish we could have generic builder functions for compiler scopes that can be used out-of-tree to produce correct cross results without an overlay

I think there are sort of? https://github.com/NixOS/nixpkgs/pull/426889

CppNix flake does cross without overlays now.

14:05:24
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/pull/426984 https://github.com/NixOS/nixpkgs/pull/26779214:08:50
@emilazy:matrix.orgemily you can certainly just roll your own yeah, but I'm talking about things like mkLLVMPackages 14:12:37
@emilazy:matrix.orgemilywhere it would be nice to offer a clean interface to instantiate your own LLVM version that can do cross, outside of Nixpkgs, without an overlay14:12:50
@emilazy:matrix.orgemilyinteresting thanks14:13:07
@emilazy:matrix.orgemilyto be clear I wouldn't even be that upset if it doesn't work with splicing :P14:13:35
@emilazy:matrix.orgemilyjust so long as you can actually reasonably access it across platforms14:13:49
@tpw_rules:matrix.orgtpw_rules i'm getting fc-cache> /nix/store/qil3nqnisxb8kmpjfp3i50wgfgdbhh76-qemu-user-10.0.3/bin/qemu-aarch64: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory when trying to cross build my ISO now. looks like hostPlatform.emulator might be broken somehow? https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/fontconfig/make-fonts-cache.nix 15:49:55
@tpw_rules:matrix.orgtpw_rulesnow as in after yesterday's staging merge15:50:06
@tpw_rules:matrix.orgtpw_rules(it could also be that suddenly my iso needs fontconfig which is broken, it really shouldn't, but it's broken regardless)15:50:25
@artturin:matrix.orgArtturinSame issue here15:51:37
@tpw_rules:matrix.orgtpw_rulesokay so maybe it's just my deps changed and that's been broken for a while15:52:54
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)no, i think i did my build on staging-next that time15:53:15
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)cross doesn't get much caching, so might as well build against staging-next15:53:35

Show newer messages


Back to Room ListRoom Version: 6