| 22 Jan 2026 |
Randy Eckenrode | Disable pre-compilation or compile them offline and vendor the resulting files. | 11:41:39 |
| @enzime:nixos.dev left the room. | 15:02:09 |
| 23 Jan 2026 |
Randy Eckenrode | My current thinking on handling the stdlib is to make Swift first look for an environment variable NIX_STDLIB_RUNTIME_${swift_tuple} then fall back to looking by path. However, I need to dig into the Swift code to make sure that is possible. If so, it would allow for multiple, target-dependent stdlibs to Just Work™. | 01:11:17 |
Randy Eckenrode | * My current thinking on handling the stdlib is to make Swift first look for an environment variable NIX_SWIFT_STDLIB_RUNTIME_${swift_tuple} then fall back to looking by path. However, I need to dig into the Swift code to make sure that is possible. If so, it would allow for multiple, target-dependent stdlibs to Just Work™. | 01:11:37 |
Randy Eckenrode | Note: No NIX_SWIFT_STDLIB_RUNTIME_FOR_BUILD or FOR_TARGET stuff. The tuple will be a platform property that the stdlib’s hook will use to set the variable. | 01:12:13 |
Randy Eckenrode | That should allow me to avoid wrappers and allow the same swiftc to support multiple -target platforms. | 01:12:37 |
Randy Eckenrode | It would be nice if we can set those up like the SDK, but I’m skeptical, and it doesn’t work right for Darwin due to having multiple SDKs (the Swift stdlib and the standard, Apple one). | 01:13:18 |
Randy Eckenrode | * My current thinking on handling the stdlib is to make Swift first look for an environment variable NIX_SWIFT_STDLIB_RUNTIME_${swift_triple} then fall back to looking by path. However, I need to dig into the Swift code to make sure that is possible. If so, it would allow for multiple, target-dependent stdlibs to Just Work™. | 01:51:34 |
Randy Eckenrode | I am going to explore SDKs though. There is some neat stuff with toolchains, but will it work? | 01:51:46 |
Randy Eckenrode | For some reason, swift build is only using the linker in my toolset configuration. | 03:11:23 |
Randy Eckenrode | That’s not very helpful. | 03:11:35 |
Ivy | like link them into zig cache? | 03:12:46 |
Randy Eckenrode | No idea for Zig. https://github.com/NixOS/nixpkgs/blob/b494a615768aac2f4b0e2839fd23ec02236368fa/pkgs/tools/security/pinentry/mac.nix is an example of a package that does it for .nib files with xcbuild to avoid depending on ibtool. I assume something could be done similarly for Zig. | 03:19:22 |
Randy Eckenrode | After messing with it for a bit, I don’t think Swift SDKs are going to do what we need. Swift doesn’t pick up the toolchain stuff from it. We’d have to merge the Swift stdlib and Darwin SDK to make it work on Darwin. It also seems to get funny ideas about triples and deployment targets. | 03:44:31 |