You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://www.swift.org/install/linux/debian/12/#versions
Swift also supports a static SDK now, it would be truly great to also have support for that.
After trying to update the package myself, I wonder if package updates were not simpler if we would just use the official swift build process instead of hacking together our own. The current version is hopelessly behind the official, with the release of cross-compiling targets such as the static SDK and WASM, which are both highly relevant, it would seem prudent to re-evaluate if utils/update-checkout and utils/build-script would not simplfy the process to a great extent.
Reacted by Jaewon Choi, Frothy, timothy, Richard Bishop, Nan Zhong, Joshua Peek, Tarek Nawara, Adam Guest, Matteo Pacini, Johannes Martinsson and 74 more
I've had varying degrees of success with a 3 stage bootstrap using swifts build scripts (not too dissimilar from this approach).
Worst of it is getting caught up at the llvm install phase in stage0, not sure how to move clang-unwrapped back to clang before it's installed. I can't find where the cmake_install script is generated, otherwise I could probably handle it in there. Once I can get past that I will have a working stage0.
I'm about to pause all that to try and get 6 building using the updated patches with the existing now-functional build script.
If anyone else is working on this and would like to collab please reach out, I'm not sure where to look for any current work on this (if there is any). Otherwise I'll try and get my build logs human-readable and link them here.
This is what I came up with, but it does not work yet (and I do not have any time in the next week to fix it). Note that it requires a patch for postFetch to work here, it is currently awaiting review: #339989
I think the idea is quite obvious, but I am not sure if it is really the way to go. But to me it seems simpler to use swift's own dependency management and build scripts instead of creating our own.
@b521f771d8991e6f1d8e65ae05a8d783 interesting. I'll give this a shot and see if I can get anywhere. I started trying to get a build to go through with HOSTTOOLS bootstrapping but keep hitting "missing libdispatch.so". Hopefully I have more luck with your solution
Made some decent progress with swift binary distribution from swift.org this weekend. Haven't tried static SDK yet or anything beyond hello world but hopefully I get somewhere soon
@TheNightmanCodeth any chance you are able to build sourcekit-lsp as well, I remember there was an issue when releasing sourcekit-lsp separately from swift build swiftlang/vscode-swift#988
@TheNightmanCodeth any chance you are able to build sourcekit-lsp as well, I remember there was an issue when releasing sourcekit-lsp separately from swift build swiftlang/vscode-swift#988
I'll be working on this over the weekend. Will update here
There’s a bootstrapping issue with Swift 6. We really don’t want to use their build scripts, either, as the current build is insufficiently factored already; having an entire LLVM build that we have to maintain and patch separately in the same derivation as the Swift compiler is a huge source of maintenance hassle and wasted build time. We should ideally be looking at splitting it up more if possible.
I’m hoping we can have Swift 6 working and building successfully on Hydra for 25.05, though! It’s great to see some preliminary work in that direction and if anyone is interested in cleaning up the Swift derivation then it’d be great to chat in the Matrix room.
Reacted by mocompute, Ali, Jared Ramirez, Suraj, Theo Paris, Jakub Povinec, Maciej Zwoliński, Jaewon Choi, Artyom Slobodkin, Alexandra Østermark and 2 more
Yeah, this is still open. I still think that it would be better to just use swift's own build system and not patch the CMake-Build - this would make updates far easier
Quick update. I have Swift 6.2.4 building on Darwin and Linux with the new packaging. I’m reviewing open issues for anything else that needs fixed, and then I have to do some cleanup before opening the PR, but it it should be coming soon (in the next week or so).
Reacted by Anish Pallati, Kilian Koeltzsch, techknowlogick, Joshua Peek, Samuel Kuehnhold, Kristijan Žic, Wataru Matsuoka, timothy, eveeifyeve, Lorenzo Setale and 12 more
Reacted by Kristijan Žic, Wataru Matsuoka, timothy, Lorenzo Setale, Michael Roitzsch, Martin Häcker, Daniel Woffinden, Dimitar Nestorov, Samuel Martineau, Maxime Brunet and 3 more
Reacted by Kristijan Žic, timothy, Lorenzo Setale, Jamie Duddleston, Daniel Woffinden, Dimitar Nestorov, Samuel Martineau, Louis Opter, Maxime Brunet, Matteo Pacini and 3 more
Reacted by andre4ik3, Pavel Atanasov, Hleb Shauchenka, eveeifyeve, techknowlogick, Cole Helbling, timothy, Samuel Kuehnhold, ed9w2in6, Lorenzo Setale and 5 more
Reacted by Hleb Shauchenka, eveeifyeve, Cole Helbling, zhengweipeng-ctw, ed9w2in6, Lorenzo Setale, Dawid, Jens Nerup and Dimitar Nestorov
Reacted by andre4ik3, Pavel Atanasov, Hleb Shauchenka, Linus Warnatz, ed9w2in6, Lorenzo Setale and Dawid
I plan to merge #557896 on Wednesday or Thursday of this week depending on whether there’s any more feedback. I have Swift 6.3.3 successfully bootstrapping on Darwin. I need to build the rest of the package set to confirm what (if anything) needs updated patches and build it on Linux. I expect Swift 6.3.3 (and 6.4.0) to follow shortly after Swift 6.2.4 is merged.
Reacted by Dimitar Nestorov, timothy, Yuto Oguchi, Linus Warnatz, 223740, Tad Fisher and Jens Nerup
Note this is still on staging. The next cycle should start around this weekend and be done the week after (when it will become available on master).
I have Swift 6.3 building on both platforms. I’m currently cleaning up the update script. Depending on the timing, the Swift 6.3 update may also make the next staging cycle.
Reacted by Pascal Dietrich, éclairevoyant, Niklas Korz, Matteo Pacini, timothy, radutomy, Lorenzo Setale, Jens Nerup and Hleb Shauchenka
Swift 6.4.1 should follow shortly. I’m doing them separately because I want it to (hopefully) be the first mundane update where changes aren’t required to the Swift packaging.
Reacted by Dimitar Nestorov, Tyce Herrman and Lorenzo Setale
Reacted by Hleb Shauchenka, timothy, Dimitar Nestorov and Lorenzo Setale
31. #574002
Swift 6.4.1 should follow shortly. I’m doing them separately because I want it to (hopefully) be the first mundane update where changes aren’t required to the Swift packaging.
Once #574002 is merged, I can mark #577150 as ready. The 6.4.1 PR is nice and boring. Hopefully Swift 6.5 doesn’t have any surprises. The big one for Swift 6.4 was dealing with the fallout of switching SwiftPM to use Swift Build by default. That’s solved now.
Activity
TheNightmanCodeth commentedon Sep 28, 2024
I've been making some progress on this myself.
I've had varying degrees of success with a 3 stage bootstrap using swifts build scripts (not too dissimilar from this approach).
Worst of it is getting caught up at the llvm install phase in stage0, not sure how to move
clang-unwrappedback to clang before it's installed. I can't find where thecmake_installscript is generated, otherwise I could probably handle it in there. Once I can get past that I will have a working stage0.I'm about to pause all that to try and get 6 building using the updated patches with the existing now-functional build script.
If anyone else is working on this and would like to collab please reach out, I'm not sure where to look for any current work on this (if there is any). Otherwise I'll try and get my build logs human-readable and link them here.
223740 commentedon Sep 30, 2024
This is what I came up with, but it does not work yet (and I do not have any time in the next week to fix it). Note that it requires a patch for postFetch to work here, it is currently awaiting review: #339989
I think the idea is quite obvious, but I am not sure if it is really the way to go. But to me it seems simpler to use swift's own dependency management and build scripts instead of creating our own.
TheNightmanCodeth commentedon Sep 30, 2024
@b521f771d8991e6f1d8e65ae05a8d783 interesting. I'll give this a shot and see if I can get anywhere. I started trying to get a build to go through with HOSTTOOLS bootstrapping but keep hitting "missing libdispatch.so". Hopefully I have more luck with your solution
TheNightmanCodeth commentedon Oct 13, 2024
Made some decent progress with swift binary distribution from swift.org this weekend. Haven't tried static SDK yet or anything beyond hello world but hopefully I get somewhere soon
https://github.com/TheNightmanCodeth/swift-bin-flake/tree/wip/wrapper
TheNightmanCodeth commentedon Oct 19, 2024
Actually got 6.0.1 working for real this time

Haven't tested Darwin but I doubt it works there. Should work on x86_64-linux and does work on aarch64-linux:
https://github.com/TheNightmanCodeth/swift-direnv
tknawara commentedon Oct 23, 2024
@TheNightmanCodeth any chance you are able to build sourcekit-lsp as well, I remember there was an issue when releasing sourcekit-lsp separately from swift build swiftlang/vscode-swift#988
TheNightmanCodeth commentedon Oct 24, 2024
I'll be working on this over the weekend. Will update here
nixos-discourse commentedon Nov 3, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/swift-6-coming-soon/55447/2
emilazy commentedon Nov 3, 2024
Linking my Discourse post here: https://discourse.nixos.org/t/swift-6-coming-soon/55447/3.
There’s a bootstrapping issue with Swift 6. We really don’t want to use their build scripts, either, as the current build is insufficiently factored already; having an entire LLVM build that we have to maintain and patch separately in the same derivation as the Swift compiler is a huge source of maintenance hassle and wasted build time. We should ideally be looking at splitting it up more if possible.
I’m hoping we can have Swift 6 working and building successfully on Hydra for 25.05, though! It’s great to see some preliminary work in that direction and if anyone is interested in cleaning up the Swift derivation then it’d be great to chat in the Matrix room.
timothyklim commentedon Dec 2, 2024
I made 6.0.2 bin version as a flake: https://github.com/timothyklim/swift-flake that works without FHS, even in bazel with rules_swift. But currently dont have a time to make a PR for nixpkgs
chore: add flake
igorgue commentedon Apr 14, 2025
6.1 is out already and it now recommends
swiftlyto installswiftbut when I tried swift cannot find some glibc stuff...223740 commentedon Apr 15, 2025
Yeah, this is still open. I still think that it would be better to just use swift's own build system and not patch the CMake-Build - this would make updates far easier
43 remaining items
reckenrode commentedon Apr 12, 2026
To keep the noise down, I post updates in the Swift channel on Matrix: https://matrix.to/#/%23nixpkgs-swift:matrix.org.
nixos-discourse commentedon Jun 2, 2026
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/unable-to-run-simple-swift-app-compiled-on-nixos/77942/9
reckenrode commentedon Aug 5, 2026
Quick update. I have Swift 6.2.4 building on Darwin and Linux with the new packaging. I’m reviewing open issues for anything else that needs fixed, and then I have to do some cleanup before opening the PR, but it it should be coming soon (in the next week or so).
reckenrode commentedon Aug 30, 2026
#557896
Samuel-Martineau commentedon Aug 30, 2026
Thank you @reckenrode for this amazing work! Swift was quite the beast to tame
shgew commentedon Aug 30, 2026
Thank you so much @reckenrode!
barkoded commentedon Sep 3, 2026
Amazing @reckenrode
reckenrode commentedon Sep 13, 2026
I plan to merge #557896 on Wednesday or Thursday of this week depending on whether there’s any more feedback. I have Swift 6.3.3 successfully bootstrapping on Darwin. I need to build the rest of the package set to confirm what (if anything) needs updated patches and build it on Linux. I expect Swift 6.3.3 (and 6.4.0) to follow shortly after Swift 6.2.4 is merged.
Cameo007 commentedon Sep 17, 2026
Resolved by #557896
reckenrode commentedon Sep 17, 2026
Note this is still on staging. The next cycle should start around this weekend and be done the week after (when it will become available on master).
I have Swift 6.3 building on both platforms. I’m currently cleaning up the update script. Depending on the timing, the Swift 6.3 update may also make the next staging cycle.
reckenrode commentedon Sep 22, 2026
#565702
reckenrode commentedon Oct 18, 2026
#574002
Swift 6.4.1 should follow shortly. I’m doing them separately because I want it to (hopefully) be the first mundane update where changes aren’t required to the Swift packaging.
timothyklim commentedon Oct 18, 2026
Thank you so much for your work!
reckenrode commentedon Oct 22, 2026
Once #574002 is merged, I can mark #577150 as ready. The 6.4.1 PR is nice and boring. Hopefully Swift 6.5 doesn’t have any surprises. The big one for Swift 6.4 was dealing with the fallout of switching SwiftPM to use Swift Build by default. That’s solved now.