!lheuhImcToQZYTQTuI:nixos.org

Nix on macOS

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

Load older messages


SenderMessageTime
12 Jan 2026
@emilazy:matrix.orgemilyyeah I figured the earlier I give annoying complaints about wild stuff the better :P18:26:42
@emilazy:matrix.orgemilyvery very excited for Swift Build though18:26:53
@emilazy:matrix.orgemily I am eager to drop xcbuild 18:26:59
@reckenrode:matrix.orgRandy EckenrodeIt’s fixed now and more sensible.18:27:04
@reckenrode:matrix.orgRandy Eckenrode Swift Build won’t be able to replace xcbuild unless we develop a driver. The swbuild CLI is too limited. 18:28:22
@emilazy:matrix.orgemily😔18:28:47
@emilazy:matrix.orgemily because of build systems calling out to xcodebuild or because we can't even use it as a hook profitably? 18:28:55
@reckenrode:matrix.orgRandy EckenrodeThere is no way to pass variables. You can’t specify scheme or destination.18:30:04
@reckenrode:matrix.orgRandy EckenrodeIt can be used as a library, so it should be possible to develop our own frontend, but one needs time to do that.18:31:16
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/reckenrode/nixpkgs/tree/swift-update-mk218:34:20
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/reckenrode/nixpkgs/blob/swift-update-mk2/pkgs/top-level/swift-packages.nix is where the Swift package set is defined.18:34:36
@reckenrode:matrix.orgRandy Eckenrodehttps://github.com/reckenrode/nixpkgs/blob/swift-update-mk2/pkgs/by-name/sw/swiftPackages/by-name/sw/swift/mk-swift-package.nix is where most of the crimes are committed.18:35:11
@reckenrode:matrix.orgRandy Eckenrode The basic structure is swiftPackages.swift defines a package out of swiftc, swift-driver, swift-testing, and swift-corelibs-xctest. I will probably be adding the stdlib as well. That’s the package that should be used. It’s meant to look (more or less) like a normal Swift toolchain. 18:36:46
@reckenrode:matrix.orgRandy Eckenrode swiftc has the stdlib and swift-driver stripped out of it. It’s just the compiler and its host libs. I will probably move the Clang resource-root to swift as well. 18:37:23
@reckenrode:matrix.orgRandy Eckenrode To build a Swift package, add swift and your build system. Swift dependencies go in buildInputs like normal packages. If we can use prebuilts, then they’ll be built separately like normal packages. Otherwise, they will commit crimes to allow SwiftPM to pick up the sources. 18:38:06
@reckenrode:matrix.orgRandy EckenrodeThis allows us to package specific versions and patch them.18:38:21
@reckenrode:matrix.orgRandy Eckenrode One might also note that swiftc is built three times. That is unfortunately necessary. The C++ bootstrap compiler is limited and buggy. I don’t think it’s intended to be used on Darwin. I have to take that then immediately turn around to build one that can deal with newer SDKs. I have no idea what we will do with the 14.4 SDK when it is dropped, but we might have to carry along a private copy for Swift. 18:39:59
@reckenrode:matrix.orgRandy Eckenrode(Arguably four times because the stdlib isn’t really meant to be built separately.)18:40:34
@reckenrode:matrix.orgRandy EckenrodeAlso note this branch includes KosmicKrisp and the stdenv cleanup.18:41:18
@reckenrode:matrix.orgRandy EckenrodeI could separate them but meh.18:41:22
@reckenrode:matrix.orgRandy 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
@reckenrode:matrix.orgRandy Eckenrode Also, IIRC, lib.extendMkDerivation is the way to define new mkDerivation functions? 18:43:24
@reckenrode:matrix.orgRandy Eckenrode * Also, IIRC, lib.extendMkDerivation is the preferred way to define new mkDerivation functions? 18:43:33
@reckenrode:matrix.orgRandy 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
@reckenrode:matrix.orgRandy 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
@reckenrode:matrix.orgRandy 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:isabelroses.comisabel changed their profile picture.18:59:21
@emilazy:matrix.orgemilywonder if we could upstream that?19:25:58
@emilazy:matrix.orgemily

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
@emilazy:matrix.orgemily 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

There are no newer messages yet.


Back to Room ListRoom Version: 6