···
-
swiftLlvmPackages = llvmPackages;
callPackage = newScope self;
-
# Swift builds its own Clang for internal use. We wrap that clang with a
-
# cc-wrapper derived from the clang configured below. Because cc-wrapper
-
# applies a specific resource-root, the two versions are best matched, or
-
# we'll often run into compilation errors.
-
# The following selects the correct Clang version, matching the version
-
inherit (swiftLlvmPackages) clang;
-
# Overrides that create a useful environment for swift packages, allowing
-
# packaging with `swiftPackages.callPackage`.
-
inherit (clang) bintools;
-
stdenv' = overrideCC pkgs.stdenv clang;
-
# Ensure that Swift’s internal clang uses the same libc++ and libc++abi as the
-
# default clang’s stdenv. Using the default libc++ avoids issues (such as crashes)
-
# that can happen when a Swift application dynamically links different versions
-
# of libc++ and libc++abi than libraries it links are using.
-
if stdenv'.cc.libcxx != null then overrideLibcxx stdenv' else stdenv';
swift-unwrapped = callPackage ./compiler {
inherit (darwin) DarwinTools sigtool;
···
if stdenv.hostPlatform.isDarwin then
-
callPackage ./libdispatch { swift = swiftNoSwiftDriver; };
if stdenv.hostPlatform.isDarwin then
-
callPackage ./foundation { swift = swiftNoSwiftDriver; };
# TODO: Apple distributes a binary XCTest with Xcode, but it is not part of
# CLTools (or SUS), so would have to figure out how to fetch it. The binary
···
swiftpm = callPackage ./swiftpm {
inherit (darwin) DarwinTools;
swift = swiftNoSwiftDriver;
swift-driver = callPackage ./swift-driver {
swift = swiftNoSwiftDriver;
···
-
sourcekit-lsp = callPackage ./sourcekit-lsp { };
-
swift-docc = callPackage ./swift-docc { };
-
swift-format = callPackage ./swift-format { };
swiftpm2nix = callPackage ./swiftpm2nix { };