| 12 Jan 2026 |
Randy Eckenrode | Also note this branch includes KosmicKrisp and the stdenv cleanup. | 18:41:18 |
Randy Eckenrode | I could separate them but meh. | 18:41:22 |
Randy Eckenrode | I’m open to other ways of defining the stdlib package, but using overrideAttrs on swiftc is really convenient to share patches and stuff. | 18:41:58 |
Randy Eckenrode | Also, IIRC, lib.extendMkDerivation is the way to define new mkDerivation functions? | 18:43:24 |
Randy Eckenrode | * Also, IIRC, lib.extendMkDerivation is the preferred way to define new mkDerivation functions? | 18:43:33 |
Randy Eckenrode | I use lib.cmakeFeature "BOOTSTRAPPING_MODE" "HOSTTOOLS" because we’re manually orchestrating the build of the different stages rather than relying on Swift to do that for us (because it didn’t work IME). | 18:46:26 |
Randy Eckenrode | Also, most of the back-deployment stuff is gone. There’s no more Swift Concurrency due to the default deployment target being newer. The only exception is the Span compatibility shim, which is needed for versions older than macOS 26. | 18:47:29 |
Randy Eckenrode | I haven’t fully gotten around to cleaning up the swiftc postInstall stuff yet. Some of that won’t be needed once the stdlib split is complete. | 18:49:24 |
| isabel changed their profile picture. | 18:59:21 |
emily | wonder if we could upstream that? | 19:25:58 |
emily | IIRC making "fake outputs" with passthru like this doesn't quite work with the various output selection functions; I forget exactly why.
would be really nice if we could use a hook here rather than a mkDerivation wrapper in general, but I suppose that depends on how we're going to wire these things up…
| 19:28:29 |
emily | I don't think we can do by-name/sw/swiftPackages; that doesn't follow the rules and nixpkgs-vet will complain about it. I'd like scopes in by-name, but it's not a thing we can really do right now. | 19:29:24 |
| 13 Jan 2026 |
Randy Eckenrode | Not sure. The swbuild tool uses its own command-line parser. It’s pretty funky. A custom frontend could just use Swift Argument Parser and delegate to the library for everything else. | 01:06:56 |
Randy Eckenrode | This is a helper for keeping the boilerplate down. I don’t see how we can allow switching build systems in a hook. One of the keys to bootstrapping is not pulling in the wrong build system. | 01:09:29 |
Randy Eckenrode | lib.getDev and lib.getOutput "dev" work as expected. What other ones are there? | 01:10:15 |
Randy Eckenrode | Ideally, I could get prebuilts working and drop all this stuff. | 01:10:26 |
Randy Eckenrode | I didn’t think so. It’s a temporary thing so I can keep the old Swift stuff around to reference while I work. The final PR will probably do it like Tcl does with tcl-modules.nix. | 01:11:36 |
Randy Eckenrode | If I can, I can revisit using custom helper hooks I guess. I hate hooks because Bash sucks, and debugging them sucks. | 01:12:51 |
Randy Eckenrode | More pressing right now is how exactly to handle stdlib discovery. | 01:14:38 |
emily | that would be nice for sure. what was the issue with that again? | 01:14:38 |
Randy Eckenrode | It requires figuring out how it works and (probably) patching SwiftPM to allow it. | 01:14:56 |
samasaur | aren't they only recently officially supported for swift-syntax only? | 01:15:14 |
samasaur | and no support for any other package | 01:15:20 |
Randy 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 |
Randy Eckenrode | The more pressing need is figuring out how to discover the stdlib. | 01:15:47 |
Randy Eckenrode | The current approach patches the compiler to find it at an arbitrary path, which isn’t very good for cross-compilation. | 01:16:19 |
emily | env variable? | 01:16:35 |
Randy Eckenrode | Ideally we could leverage the compiler’s ability to discover the stdlib relative to its location. | 01:16:48 |
emily | preferably target-specific env variable | 01:16:48 |
emily | though, yeah, avoiding patching at all is nicer | 01:17:01 |