!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

561 Members
121 Servers

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


SenderMessageTime
18 Mar 2025
@axman6:matrix.orgAxman6 Is there an easy way to make a wrapper for a binary which executes it using hostPlatform.emulator? 01:03:34
@artturin:matrix.orgArtturin
In reply to @axman6:matrix.org
Is there an easy way to make a wrapper for a binary which executes it using hostPlatform.emulator?

Yes

https://github.com/NixOS/nixpkgs/blob/fcd099251655af6f7c935df9baf72b5963f33e86/pkgs/tools/admin/winbox/default.nix#L50 (here src is a exe)

https://github.com/search?q=repo%3ANixOS%2Fnixpkgs+%2FmakeWrapper.%2Bjre%2F&type=code

01:11:47
@axman6:matrix.orgAxman6 right - so you'd use something makeWrapper ${hostPlatform.emulator buildPackages} --args ${package}/bin/foo? 01:21:41
@artturin:matrix.orgArtturin You're forgetting the destination path, and it's --add-flags 01:28:37
@axman6:matrix.orgAxman6uh, yep - I should've just copied and pasted what I wrote in my derivation =)03:55:04
@fzakaria:one.ems.hostfzakaria joined the room.05:01:17
@fzakaria:one.ems.hostfzakaria 👋
is there a stdenv for musl without using pkgsMusl ?
05:01:34
@rosscomputerguy:matrix.orgTristan Ross No 05:11:42
@rosscomputerguy:matrix.orgTristan RossBut I have plans for things of that nature05:11:50
@rosscomputerguy:matrix.orgTristan Ross It'll be some time but I'm working on decoupling things in a way that allows up to swap out toolchain related things more ad-hoc with {host,build,target}Platform. 05:12:38
@fzakaria:one.ems.hostfzakariaoh thtat's cool; I have some really bad Nix code trying to build some stuff very specifically in musl19:16:06
@fzakaria:one.ems.hostfzakariato avoid "mass rebuilds" -- it's so fragile. I tried moving things to overlay and too much borked19:16:18

Show newer messages


Back to Room ListRoom Version: 6