| 6 Dec 2025 |
Randy Eckenrode | I wonder if I can do something hacky to swift-toolchain-sqlite to make it devendor sqlite. 🤔 | 12:44:26 |
vcunat | Ever seen something like this?
File "/nix/store/b229zll0pw9ljig3jblh2fda9in786i8-python3.13-knot-resolver-manager_6-6.0.17/bin/knot-resolver", line 2
PATH=${PATH:+':'$PATH':'}
^
SyntaxError: invalid syntax
This wrapper stuff is auto-generated by buildPythonPackage and it does work on linux.
| 13:24:41 |
vcunat | (except for a tiny non-python patch changing this hash, it's all just nixpkgs master) | 13:27:22 |
vcunat | Oh, does macOS behave different than Linux around executing scripts? 🤔 | 13:28:36 |
vcunat | i.e. maybe it's syntax error because a wrong interpreter is used? | 13:29:33 |
K900 | That's a Python syntax error | 13:29:55 |
K900 | In a script with clearly bash syntax | 13:30:00 |
K900 | So something is trying to call python <bash script> | 13:30:12 |
vcunat | Hmm, thanks. I think this moves me in a hopeful direction. | 13:32:28 |
vcunat | I see. It's an unexpected interaction of nix-specific wrapping machinery with OS-specific piece of code from upstream. | 13:47:44 |
vcunat | (when the script attempts to reexecute itself) | 13:48:07 |
emily | shebangs don't work with shell wrappers on macOS | 15:57:16 |
emily | i.e. if #!/nix/store/foo, then foo must be a makeBinaryWrapper rather than a shell wrapper | 15:57:28 |
emily | perhaps something around that | 15:57:34 |
| @thetaoofsu:matrix.org left the room. | 18:54:47 |
Randy Eckenrode |
(2708 duplicate frames omitted)
error: stack overflow; max-call-depth exceeded
at /Users/reckenrode/Developer/nixpkgs/lib/fixed-points.nix:325:16:
324| let
325| prev = f final;
| ^
326| in
| 19:01:33 |
Randy Eckenrode | I managed a stack overflow without triggering an infinite recursion. 🤔 | 19:01:50 |
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 |