| 6 Dec 2025 |
toonn | That's what we call sharpshooting : D | 19:10:11 |
Randy Eckenrode | I think the problem is how I was trying to set up the Swift bootstrap. Because I already have a scope, I do overrideScope in the scope definition to declare a bootstrap version of the scope. I defined swift-bootstrap in the real scope as bootstrapSwiftPackages.swift, which uses swift-bootstrap to compile swiftc. | 19:12:13 |
Randy Eckenrode | Fortunately, I found a way around it. Once I have SwiftPM not causing an infinite recursion, I’ll share the scope. | 19:19:56 |
Randy Eckenrode | Also, llvm-install-name-tool supports -delete_all_rpaths, which the cctools one does not. That’s pretty handy. | 19:20:30 |
Randy Eckenrode | (I tried making LLVM bintools the default for building Swift, but there is some work that needs to be done to make LLD actually work as a default linker on Darwin. The wrapper is not set up for it.) | 19:21:06 |
Randy Eckenrode | * | 19:21:20 |
Randy Eckenrode | let
autoCalledPackages = import ./by-name-overlay.nix ../by-name/sw/swiftPackages/by-name;
in
{
lib,
clangStdenv,
generateSplicesForMkScope,
llvmPackages,
makeScopeWithSplicing',
otherSplices ? generateSplicesForMkScope "swiftPackages",
}:
makeScopeWithSplicing' {
inherit otherSplices;
extra =
self:
let
bootstrapSwiftPackages = self.overrideScope (
final: prev: {
swift-driver = prev.swift-driver.override { enableCmakeBuild = true; };
swiftpm = prev.swiftpm.override { enableCmakeBuild = true; };
swift-bootstrap = prev.swiftc.override { swift-bootstrap = null; };
}
);
in
{
inherit (self.swift) mkSwiftPackage;
llvmPackages_current = llvmPackages;
swift-bootstrap = bootstrapSwiftPackages.swift;
swiftpmHook-bootstrap = self.swiftpmHook.override { swiftpm = bootstrapSwiftPackages.swiftpm; };
};
f = lib.extends autoCalledPackages (self: {
stdenv = clangStdenv;
swift_release = "6.2.1";
});
}
| 19:30:27 |
| 7 Dec 2025 |
Randy Eckenrode | My current status is I’m working through dependencies trying to build them how Apple distributes Swift (e.g., llbuild as a framework, etc). | 04:21:28 |
WeetHet | I wonder if iTerm would be buildable from source after the swift work is done | 13:55:49 |
WeetHet | And if people would even want it to be since that would mess the privileges on each update | 13:56:12 |
WeetHet | * And if people would even want it to be since that would mess the privileges up on each update | 13:56:17 |
Randy Eckenrode | We stopped building it because it relies on entitlements for security. | 13:56:56 |
WeetHet | * And if people would even want it to be since that would mess the permissions up on each update | 14:01:14 |
WeetHet | (That's the reason I'm running a binary build of Zed even though nixpkgs has a from-source one) | 14:01:50 |
WeetHet | JIT and Apple Events don't need anything except a self signature AFAIK and the personal-information ones aren't exactly necessary for iTerm to function | 14:24:17 |
WeetHet | At least providing a from source build with reduced entitlement set would be nice | 14:24:42 |
Randy Eckenrode | Some things (like the AI and the browser plugin) enable the app sandbox via entitlement. | 14:29:41 |
Randy Eckenrode | ninja: error: '/nix/store/fc9wkimiw706hdhxhk13mfcicaacjzlq-swift-llbuild-6.2.1/Library/Frameworks/llbuild.framework/llbuild.framework/llbuild', needed by 'lib/libSwiftDriverExecution.dylib', missing and no known rule to make it
| 21:44:40 |
Randy Eckenrode | CMake is finding the framework, but it is very confused about where the framework is. Anyone know enough CMake to know why it would do that? | 21:44:56 |
| 8 Dec 2025 |
Randy Eckenrode | Oh.
if(NOT TARGET llbuildSwift)
add_library(llbuildSwift UNKNOWN IMPORTED)
set_target_properties(llbuildSwift PROPERTIES
FRAMEWORK TRUE
INTERFACE_COMPILE_OPTIONS -F${llbuild_FRAMEWORKS}
IMPORTED_LOCATION ${llbuild_FRAMEWORKS}/llbuild.framework/llbuild)
endif()
| 00:42:21 |
Randy Eckenrode | Probably that don’t the wrong thing. | 00:42:31 |
Randy Eckenrode | Why does CMake set the deployment target to macOS 26 for Swift? ☹️ | 01:59:51 |
Randy Eckenrode | It goes off the triple, which defaults to 26.0 on my system. That’s a lovely impurity. | 02:16:44 |
Randy Eckenrode | Also, CMake doesn’t handle mixed language modules at all. You have to manually generate a bunch of yaml. | 02:17:01 |
Randy Eckenrode | https://www.swift.org/documentation/articles/wrapping-c-cpp-library-in-swift.html#cmake | 02:17:14 |
Randy Eckenrode | I wonder if Nix could (ab)use VFS overlays with Clang instead of doing the hacks we do today to make Nix stuff play nicely with unwrapped compilers. | 02:18:38 |
Randy Eckenrode | Like just magically have the libc++ headers of your choice appear as if they were in the sysroot. | 02:19:06 |
Randy Eckenrode | https://forums.swift.org/t/relationship-if-any-between-import-underlying-module-and-emit-objc-header/61287/4 | 02:21:47 |
tiferrei | Hi folks, I seem to have corrupted my nix db somehow, I keep getting warning: error: SQLite database '/nix/var/nix/db/db.sqlite' is busy in most operations. What is the best way to sort this out? (Lix, nix-darwin) Thanks! | 10:23:49 |
tiferrei | Fixed: Nuked the nix-darwin installation, then the whole nix installation. reinstalled nix and reapplied nix-darwin. | 12:31:58 |