!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

1176 Members
“There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org192 Servers

Load older messages


SenderMessageTime
13 Jan 2026
@samasaur:matrix.orgsamasaurand no support for any other package01:15:20
@reckenrode:matrix.orgRandy Eckenrode There is some magic for Swift Syntax, but it seems to be really brittle. I was able to get it to parse a prebuilts entry in workspace-state.json, but SwiftPM didn’t do anything with it. 01:15:31
@reckenrode:matrix.orgRandy EckenrodeThe more pressing need is figuring out how to discover the stdlib.01:15:47
@reckenrode:matrix.orgRandy EckenrodeThe current approach patches the compiler to find it at an arbitrary path, which isn’t very good for cross-compilation.01:16:19
@emilazy:matrix.orgemilyenv variable?01:16:35
@reckenrode:matrix.orgRandy EckenrodeIdeally we could leverage the compiler’s ability to discover the stdlib relative to its location.01:16:48
@emilazy:matrix.orgemilypreferably target-specific env variable01:16:48
@emilazy:matrix.orgemilythough, yeah, avoiding patching at all is nicer01:17:01
@emilazy:matrix.orgemilycan we just symlink the compiler and the stdlib nearby?01:17:11
@reckenrode:matrix.orgRandy EckenrodeThat’s what I want to do, but I also want them to be discoverable by the linker.01:18:28
@reckenrode:matrix.orgRandy Eckenrode How does it work on Linux? Does linking with a .so at some path automatically set up the rpath? 01:18:44
@reckenrode:matrix.orgRandy EckenrodeIt makes me wonder what even the point of the patch is if the linker will handle things for us.01:20:35
@reckenrode:matrix.orgRandy Eckenrode

“It also fixes the output of swift -frontend -print-target-info, which SwiftPM uses to set the rpath on Linux.”

If the .sos are in the normal place, won’t the linker take care of this for us?

01:21:27
@emilazy:matrix.orgemilyis this about one of our existing patches?01:22:38
@emilazy:matrix.orgemilyI figured you would have just thrown all of those away…01:22:45
@emilazy:matrix.orgemily I assumed -L would add to the rpath or such. 01:23:42
@emilazy:matrix.orgemilynot sure exactly how it works.01:23:44
@reckenrode:matrix.orgRandy Eckenrode The separate lib patch. 01:24:10
@emilazy:matrix.orgemilyoh, our wrapper does it.01:24:37
@emilazy:matrix.orgemily
# Three tasks:
#
#   1. Find all -L... switches for rpath
01:24:40
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/NixOS/nixpkgs/blob/c3d8909996f4f24ed7cbeeee7600ee75c873fd04/pkgs/development/compilers/swift/compiler/patches/swift-separate-lib.patch01:24:50
@emilazy:matrix.orgemilythat one is nonsense anyway01:25:10
@reckenrode:matrix.orgRandy Eckenrode I assume the reason why that doesn’t work with Swift is the libraries are not in $out/lib, but I’ve taken to putting all of them there in my work. 01:25:13
@reckenrode:matrix.orgRandy EckenrodeSo the linker should do the right thing.01:25:23
@emilazy:matrix.orgemily IIRC half of what's in $lib is not required at runtime 01:25:25
@emilazy:matrix.orgemilyand there's some dumb dependency too01:25:51
@reckenrode:matrix.orgRandy EckenrodeI’ve got the stdlib build with only the host shared libraries. Build platform stuff is staying with the compiler.01:26:09
@reckenrode:matrix.orgRandy EckenrodeSo in theory you can make a cross-Swift using the new host’s stdlib.01:26:32
@reckenrode:matrix.orgRandy EckenrodeBut cross won’t work out of the box with my work. It doesn’t now, and I don’t want to spend time on it right now.01:26:50
@reckenrode:matrix.orgRandy EckenrodeI want to get Swift updated to 6.2.x with the rewritten package set, so I can switch gears back to Darwin for a bit.01:27:39

Show newer messages


Back to Room ListRoom Version: 6