| 19 Apr 2026 |
viraptor | I'll check today if anything changed post-rebase. | 23:47:54 |
| 20 Apr 2026 |
viraptor | * From your pre-rebase mk2 branch - https://github.com/viraptor/nixpkgs/tree/hammerspoon-swbuild
(all the changes are "YOLO, just make it work" level, it will be cleaned up a lot before submitting anywhere) | 00:25:30 |
Randy Eckenrode | Is it using the wrong SDK? Swift is really sensitive to SDK version. | 00:44:29 |
Randy Eckenrode | It should be propagating the 26.x SDK though. | 00:44:38 |
viraptor | Hmm... probably. | 00:50:26 |
| picnoir changed their display name from Picnoir to picnoir. | 10:06:11 |
viraptor | It seems like using apple-sdk_26 solved some errors. But now I'm stuck with SwiftShims module missing, which should be loaded from Swift's stdlib, but even putting swiftPackages.stdlib explicitly in nativeBuildInputs doesn't help. I get lots of:
Swift.swiftmodule/x86_64-apple-macos.swiftinterface:5:8: error: Unable to find module dependency: 'SwiftShims' Grepping that string in the stdlib package doesn't bring up anything, so I'm suspicious of everything now. | 11:40:04 |
Randy Eckenrode | This is also failing in Hammerspoon’s build or in the Swift build itself? | 11:42:09 |
Randy Eckenrode | The latter should work. I’ve been building .NET and mpv with it locally. | 11:42:52 |
Randy Eckenrode | Well, until nodejs-slim got totally broken. | 11:43:30 |
viraptor | hammerspoon build. Swift worked fine. | 11:43:37 |
viraptor | ah! there's something in stdlib.dev - I missed it, maybe I'll be lucky :) | 11:44:41 |
viraptor | I was not lucky... stdlib.dev does indeed contain SwiftShim, but it's not found. Unfortunately I know nothing about Swift module lookup system. I'll do some reading unless you know the answer immediately.
/nix/store/ifz6r2b8q64r73iq249h49yddficziy4-new_sdk/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/swift/Swift.swiftmodule/x86_64-apple-macos.swiftinterface:5:8: error: Unable to find module dependency: 'SwiftShims'
import SwiftShims | 11:49:40 |
Randy Eckenrode | Are you using swiftPackages.swift or .swiftc? | 11:51:21 |
Randy Eckenrode | That SDK path is odd. | 11:52:13 |
viraptor | .swiftc - I think it's working better now with .swift! thank you. | 11:53:14 |
viraptor | 🎉 it did work. | 11:53:57 |
Randy Eckenrode | The stdlib is separated from the compiler. .swift sets up a symlink farm with the stdlib, compiler, and other needed dependencies. | 11:54:22 |
Randy Eckenrode | Like on Linux it will include Foundation. | 11:54:34 |
Randy Eckenrode | Nix makes building multiple packages from one source an enormous pain in the ass, but we want these separate so you don’t pull in the full Swift closure just for linking to its stdlib (and for cross eventually). | 11:55:40 |
viraptor | That makes sense. Ok, I'm getting yet-another-tool-missing error, but I can work with that. The success is close - I can smell it... | 11:55:49 |
Randy Eckenrode | I was considering using Swift for some things, but this experience has me wanting to stick with .NET and F#. | 11:56:53 |
Randy Eckenrode | Or <insert favorite non-Swift language/ecosystem here>. I just happen to really like F#. | 12:08:34 |
Randy Eckenrode | The lack of a bootstrap story, the proprietary stuff in the toolchain (no testing on Darwin without Xcode!), the narrow vision on building iOS apps, the increasing complexity, etc | 12:10:31 |
Randy Eckenrode | * | 12:10:44 |
viraptor | F# is a fine choice. One day I'll get motivated enough to start somehting in it rather than C#... | 12:10:47 |
Randy Eckenrode | There’s an open issue for vendoring deps that’s almost five years old. There’s no good story for Linux distros to package Swift applications and libraries. | 12:11:33 |
Randy Eckenrode | My branch is a second attempt at vendoring because the first broke with SwiftPM 6.x. It works, but it’s a hack. | 12:12:51 |
viraptor | I acquired some hate towards xcode recently for my own reasons so I'm happy to replace their proprietary tools one by one, in whatever way possible. (it's easy-ish when you just go for 1:1 compatibility - if the result matches, it's correct...) | 12:12:57 |
Randy Eckenrode | SwiftPM’s dependency model is based on having a full Git repo. 😕 | 12:16:26 |