!pbdtvoHxUGLhcEvnlu:nixos.org

Exotic Nix Targets

330 Members
105 Servers

Load older messages


SenderMessageTime
30 Jun 2022
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howAnd it's set up to do remote builds on my beefy ryzen 5950x box, so everything just sorta happens, and fast.09:22:40
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howIs it possible to do remote builds with cross-compilation?09:23:07
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how * Is it possible to do remote/distributed builds with cross-compilation?09:23:18
@qyliss:fairydust.spaceAlyssa Rossshould be09:23:24
@dramforever:matrix.orgdramforeveri think it works eactly the same because nix doesn't know about cross anyway09:24:45
@dramforever:matrix.orgdramforeverwait do you mean (build, host, target) kind of cross or qemu-user kind of cross09:25:08
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howI mean like I'm doing in my visionfive-nix flake 09:25:29
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how
{
	nix.buildMachines = [ {
	 hostName = "builder";
	 system = "x86_64-linux";
	 # if the builder supports building for multiple architectures, 
	 # replace the previous line by, e.g.,
	 # systems = ["x86_64-linux" "aarch64-linux"];
	 maxJobs = 1;
	 speedFactor = 2;
	 supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
	 mandatoryFeatures = [ ];
	}] ;
	nix.distributedBuilds = true;
	# optional, useful when the builder has a faster internet connection than yours
	nix.extraOptions = ''
		builders-use-substitutes = true
	'';
}
09:25:31
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howhere's the example from https://nixos.wiki/wiki/Distributed_build09:25:41
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how in this case, system = "x86_64-linux"; I want to be able to put a config on my visionfive, that says "Do a distributed build, where you cross-compile for riscv64 on an x86_64-linux machine" 09:26:18
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howthis would work with binfmt, but I actually just want cross-compilatin 09:26:36
@dramforever:matrix.orgdramforevernix only sees 'on a x86_64-linux machine'09:26:37
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how * this would work with binfmt, but I actually just want cross-compilation 09:26:38
@dramforever:matrix.orgdramforever so it works like any other x86_64-linux build 09:26:46
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howah right it's my nixos config that needs to be set `crossSystem = "riscv64-linux";09:27:17
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how * ah right it's my nixos config that needs to be set `crossSystem = "riscv64-linux"`; 09:27:20
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how * ah right it's my nixos config that needs to be set crossSystem = "riscv64-linux"\ 09:27:23
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how * ah right it's my nixos config that needs to be set `crossSystem = "riscv64-linux"\ 09:27:25
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how * ah right it's my nixos config that needs to be set nixpkgs.crossSystem = "riscv64-linux" 09:27:30
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how if I have a nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ { nixpkgs.crossSystem = "riscv64-linux"; } ]; } this will surprisingly just work 09:28:28
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how If I did nixos-rebuild switch --flake .#visionfive-cross-x86 -j0 on the board though.. I wonder if it would fail 09:29:27
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howthe important part is that the board would have to perform 0 jobs, since its host architecture is riscv64-linux, and I'm just not sure if it'd work. I'd have to test.09:30:08
@matthewcroughan:defenestrate.itmatthewcroughan - nix.how * the important part is that the board would have to perform 0 jobs, since its host architecture is riscv64-linux and could not perform the work, and I'm just not sure if it'd work. I'd have to test.09:30:17
@dramforever:matrix.orgdramforeveryeah it complains about not being able to find a builder up to the task09:33:49
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howit's a shame that a configuration can't mix and match cross-compiled and natively compiled paths 09:34:50
@matthewcroughan:defenestrate.itmatthewcroughan - nix.howmaybe that breaks everything in a way I can't see though 09:35:03
@dramforever:matrix.orgdramforever BTW In case this is helpful, https://hydra.nichi.co builds github:NickCao/nixpkgs/riscv and serves it at https://cache.nichi.co 09:35:37
@dramforever:matrix.orgdramforever
In reply to @matthewcroughan:defenestrate.it
it's a shame that a configuration can't mix and match cross-compiled and natively compiled paths
you can, you just painstakingly set services.foo.package = whateverCrossPkgs everywhere and patch every NixOS module that says pkgs.bar
09:36:28
@dramforever:matrix.orgdramforever
In reply to @matthewcroughan:defenestrate.it
it's a shame that a configuration can't mix and match cross-compiled and natively compiled paths
* you can, you just painstakingly set services.foo.package = whateverCrossPkgs.foo everywhere and patch every NixOS module that says pkgs.bar
09:36:43
@dramforever:matrix.orgdramforever
In reply to @dramforever:matrix.org
BTW In case this is helpful, https://hydra.nichi.co builds github:NickCao/nixpkgs/riscv and serves it at https://cache.nichi.co
It's all x86_64-linux to riscv64-linux cross. I can't believe it even works. I think I just suggested NickCao do cross compilation once and look what they've done
09:37:53

There are no newer messages yet.


Back to Room ListRoom Version: 6