!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

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


SenderMessageTime
19 Jan 2026
@reckenrode:matrix.orgRandy Eckenrode I did make one tweak to add a product to Package.swift. The new SwiftPM hook supports installing products automatically if they’re defined in Package.swift. 20:36:36
@samasaur:matrix.orgsamasauroh that's really nice20:36:46
@reckenrode:matrix.orgRandy Eckenrode
$ nix develop -f . swiftPackages.cxx-interop-test -L
$ command -v clang
/nix/store/3fbjimjwwxk682a9gkbr2nss0yf232mf-clang-wrapper-21.1.8/bin/clang
20:37:13
@reckenrode:matrix.orgRandy Eckenrode Though I’m not sure that Swift 6.2 is invoking clang for its interop support. 20:37:27
@saiko:knifepoint.netKatalin 🔪 perhaps it needs additional include directories, or swiftpm does use swift clang inherently 20:37:29
@reckenrode:matrix.orgRandy Eckenrode It seems to be fine when invoked by SwiftPM but not when called directly. I can use the Xcode clang just fine with that header. 20:44:47
@saiko:knifepoint.netKatalin 🔪 yeah, that sounds like the same situation then 20:45:49
@saiko:knifepoint.netKatalin 🔪 iirc that generated header has a bunch of conditional includes at the top with has_include, and these errors look like missing defines, so maybe if you give it just the right include paths it'll get further, but I'd have to start digging 20:46:51
@reckenrode:matrix.orgRandy Eckenrode It needs this header: swiftToCxx/_SwiftCxxInteroperability.h . 20:48:15
@reckenrode:matrix.orgRandy EckenrodeThat has the defines.20:48:23
@reckenrode:matrix.orgRandy Eckenrode The Xcode toolchain ships it at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/swiftToCxx/_SwiftCxxInteroperability.h. 20:49:32
@reckenrode:matrix.orgRandy EckenrodeI can put it in stdlib-dev/include, which should get picked up automatically by the wrapper.20:51:21
@reckenrode:matrix.orgRandy Eckenrode * I can put it in stdlib-dev/include, which should get picked up automatically by the wrapper. 20:51:29
@saiko:knifepoint.netKatalin 🔪 well well, the very simple case (empty module) does compile with that and clang++ 19. I'll have to test it with a larger project that actually exports some types 20:52:43
@reckenrode:matrix.orgRandy EckenrodeI have a working test that creates a Swift struct from C++ and prints the value.22:46:16

Show newer messages


Back to Room ListRoom Version: 6