nixpkgs/pkgs/development/compilers/swift
Maximilian Bosch 2dcdf60272
swift: fix build w/ glibc-2.39
Failing Hydra build: https://hydra.nixos.org/build/249763077/nixlog/12

The problem is that glibc commit
64b1a44183a3094672ed304532bedb9acc707554 marked the `FILE*` argument of a few
functions including `fread` & `ferror` as non-null. The applied patch
("Android: add better nullability checks for nullability annotations added in NDK 26")
is targeted for the Android platform, but fixes said issue as well: the
handle returned from `fopen` is of type `Optional<T>` and the `guard`
expression unwraps that now (and throws an exception if `nil` is
returned). The previous `nil`-check didn't modify the type of `fp`, but
only raised the exception and moved on with `Optional<T>`.

It's a little sad that the patch needs to be applied at so many places,
but I guess that's what you get with language-level package managers 🤷
Also, seems good-enough to me given that it's actually temporary, the
patch is already upstream and will probably be obsolete at one of the
next Swift updates.
2024-03-02 19:01:51 +01:00
..
compiler swift: fix build against gcc-13 2024-01-03 19:54:04 +00:00
foundation swiftPackages.Foundation: fix build w/ glibc-2.38 2023-09-27 14:36:44 +02:00
libdispatch swiftPackages.Dispatch: fix linux build 2022-11-21 19:18:10 +01:00
sourcekit-lsp swift: fix build w/ glibc-2.39 2024-03-02 19:01:51 +01:00
swift-docc swiftPackages.swift-docc: convert swiftFlags to a list 2023-05-29 20:16:22 -04:00
swift-driver swift: fix build w/ glibc-2.39 2024-03-02 19:01:51 +01:00
swift-format swift: fix build w/ glibc-2.39 2024-03-02 19:01:51 +01:00
swiftpm swift: fix build w/ glibc-2.39 2024-03-02 19:01:51 +01:00
wrapper swift: 5.7.3 -> 5.8 2023-04-30 15:03:20 +02:00
xctest
default.nix treewide: add __attrsFailEvaluation and __recurseIntoDerivationForReleaseJobs 2023-12-15 05:13:46 -08:00
sources.nix swift-format: init at 5.8 2023-05-06 19:40:08 +02:00