Nix Cross Compiling | 578 Members | |
| 125 Servers |
| Sender | Message | Time |
|---|---|---|
| 18 Feb 2025 | ||
| Windows doesn't really do static | 05:34:57 | |
| yeah ok - I guess I need to find out how windows packages things up | 06:10:01 | |
| 19 Feb 2025 | ||
| Is there a way to have Nix run a VM or something else to run things like tests when cross compiling? | 01:32:21 | |
In reply to @axman6:matrix.orgNo but in some cases it should be possible to hook up stdenv.hostPlatform.emulator buildPackages somehow | 01:52:04 | |
| * No but in some cases it might be possible to hook up stdenv.hostPlatform.emulator buildPackages somehow | 01:52:18 | |
| * No but in some cases it might be possible to hook up `stdenv.hostPlatform.emulator buildPackages somehow` | 01:52:28 | |
| * No but in some cases it might be possible to hook up `stdenv.hostPlatform.emulator buildPackages` somehow | 01:52:42 | |
| https://github.com/search?q=repo%3ANixOS%2Fnixpkgs+%2F%5C.emulator%2F&type=code | 01:53:27 | |
| Ok, that helped me find https://nix.dev/tutorials/cross-compilation.html#real-world-cross-compiling-of-a-hello-world-example too, thanks | 01:57:46 | |
| now to figure out how to run x86_64 wine under some VM on aarch64-darwin 😂 | 01:59:05 | |
| If you want a linux builder https://nixcademy.com/posts/macos-linux-builder/ | 02:00:12 | |
| That looks shockingly simple. Is it possible for the VM to share the host's /nix/store? | 02:06:46 | |
| Oh actually, I assume remote builders will just do the build and pass back the results to the original build machine | 05:23:32 | |
| Let me know if there's a better place to ask (#Nix on macOS maybe?), but would bit be possible to also have a x86_64-linux VM using this? | 05:27:38 | |
In reply to @axman6:matrix.orgIt technically should be, the arch shouldn't matter too much imo. | 05:30:14 | |
| 20:06:15 | ||
| 20 Feb 2025 | ||
| 12:12:58 | ||
| 21 Feb 2025 | ||
In reply to @axman6:matrix.orgIf you are using nix-darwin Linux builder, there is a way to use Rosetta to build x86_64-linux binaries. If you’d rather, you could have a qemu VM window open up and use that. One moment, I can link you to some relevant issues and projects I’ve worked on for creating Linux VMs on MacOS. | 18:50:57 | |
| https://github.com/LnL7/nix-darwin/issues/1192 https://github.com/formthefog/lasr/blob/main/flake.nix#L217 | 18:53:57 | |
| Keep in mind the Linux builder is not actually cross compiling IIRC | 18:55:28 | |
| 23 Feb 2025 | ||
| Incredible success story: I got nodejs to build as linux -> freebsd cross by injecting some intermediate binaries from the native linux build. https://github.com/NixOS/nixpkgs/pull/384413 | 03:02:20 | |
| that's, uh, wow | 04:02:04 | |
| If testing is needed, I can test on Ampere lol. | 04:10:23 | |
| 24 Feb 2025 | ||
| Is there a non-zero chance of being able to build a python app using pkgsCross.mingwW64? I'm running into issues early on with bash complaining it can't run as a pe executable (seems totally reasonable, but I'm not sure where it's decided it needs to do that) Or alternatively, any chance of being able to build python things for windows in some form of VM/wine/something | 05:30:23 | |
In reply to @axman6:matrix.orgUsing Python 3.11, maybe. I think at least the interpreter built successfully, not sure about most packages.. | 06:38:26 | |
| 25 Feb 2025 | ||
When using callPackage ./whatever {rustPlatform = customPlatform}, are the rust and cargo packages spliced into the package the same that are under rustPlatform.rust.{rustc, cargo}? | 21:00:04 | |
| You have to add customPlatform toplevel to have it spliced | 21:01:26 | |
| Amd then rustPlatform = __splicedPackages.customPlatform | 21:01:41 | |
| * You have to add customPlatform toplevel or available from thereto have it spliced | 21:02:55 | |
| I'm sorry, I'm not quite sure what you mean. I currently have a file that is like
Which is called from another file with a rust-overlay toolchain using
as it keeps yelling at me that using | 21:09:13 | |