push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
callPackage,
swift,
swiftpm,
swiftpm2nix,
Foundation,
XCTest,
}:
let
sources = callPackage ../sources.nix { };
generated = swiftpm2nix.helpers ./generated;
in
stdenv.mkDerivation {
pname = "swift-docc";
inherit (sources) version;
src = sources.swift-docc;
# TODO: We could build this from `apple/swift-docc-render` source, but that
# repository is not tagged.
renderArtifact = sources.swift-docc-render-artifact;
nativeBuildInputs = [
swift
swiftpm
];
buildInputs = [
Foundation
XCTest
];
configurePhase =
generated.configure
# Fix the build with modern Clang.
#
# Based on the upstream fix for Musl:
# <https://github.com/apple/swift-nio/commit/fc6e3c0eefb28adf641531180b81aaf41b02ed20>
+ ''
swiftpmMakeMutable swift-nio
patch -p1 -d .build/checkouts/swift-nio -i ${./fix-swift-nio.patch}
'';
# We only install the docc binary, so don't need the other products.
# This works around a failure building generate-symbol-graph:
# Sources/generate-symbol-graph/main.swift:13:18: error: module 'SwiftDocC' was not compiled for testing
# TODO: Figure out the cause. It doesn't seem to happen outside Nixpkgs.
swiftpmFlags = [ "--product docc" ];
# TODO: Tests depend on indexstore-db being provided by an existing Swift
# toolchain. (ie. looks for `../lib/libIndexStore.so` relative to swiftc.
#doCheck = true;
installPhase = ''
binPath="$(swiftpmBinPath)"
mkdir -p $out/bin $out/share/docc
cp $binPath/docc $out/bin/
ln -s $renderArtifact/dist $out/share/docc/render
'';
# Canary to verify output of our Swift toolchain does not depend on the Swift
# compiler itself. (Only its 'lib' output.)
disallowedRequisites = [ swift.swift ];
meta = {
description = "Documentation compiler for Swift";
mainProgram = "docc";
homepage = "https://github.com/apple/swift-docc";
platforms = with lib.platforms; linux ++ darwin;
license = lib.licenses.asl20;
teams = [ lib.teams.swift ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/Package.swift b/Package.swift
index 39c6fb4b2f..02c08b898d 100644
--- a/Package.swift
+++ b/Package.swift
@@ -26,7 +26,7 @@
.target(name: "NIOFoundationCompat", dependencies: ["NIO"]),
.target(name: "CNIOAtomics", dependencies: []),
.target(name: "CNIOSHA1", dependencies: []),
- .target(name: "CNIOLinux", dependencies: []),
+ .target(name: "CNIOLinux", dependencies: [], cSettings: [.define("_GNU_SOURCE")]),
.target(name: "CNIODarwin", dependencies: [], cSettings: [.define("__APPLE_USE_RFC_3542")]),
.target(name: "CNIOWindows", dependencies: []),
.target(name: "NIOConcurrencyHelpers",

View File

@@ -0,0 +1,14 @@
# This file was generated by swiftpm2nix.
{
workspaceStateFile = ./workspace-state.json;
hashes = {
"swift-argument-parser" = "1jph9w7lk9nr20fsv2c8p4hisx3dda817fh7pybd0r0j1jwa9nmw";
"swift-cmark" = "1qswlh6j9mlfq8qj7xfqspla7w7rrzvplgcs4mgllgi012yfgwnp";
"swift-crypto" = "020b8q4ss2k7a65r5dgh59z40i6sn7ij1allxkh8c8a9d0jzn313";
"swift-docc-plugin" = "11d6nhi139yzk1lxxrixsbgyj1bnvmh40wj30y725q83nqq49ljh";
"swift-docc-symbolkit" = "14w37wzbx1mygfwm4iv0ypj120n1axhk627rg5a7v8j0ln511r7s";
"swift-lmdb" = "0azmc24mnxn4pbda8w8v7hy3h0gqqm4br43pnr7lc4sfj3dcv43m";
"swift-markdown" = "1l4ydc0xyv88gnyc33p61qavdh8cv98c548n1icphrfd6i78yygw";
"swift-nio" = "04bvay94b34ynmlvgyl9a7f431l3cf8k2zr483spv8mvyh1hxiqn";
};
}

View File

@@ -0,0 +1,144 @@
{
"object": {
"artifacts": [],
"dependencies": [
{
"basedOn": null,
"packageRef": {
"identity": "swift-argument-parser",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-argument-parser",
"name": "swift-argument-parser"
},
"state": {
"checkoutState": {
"revision": "e394bf350e38cb100b6bc4172834770ede1b7232",
"version": "1.0.3"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-argument-parser"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-cmark",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-cmark.git",
"name": "cmark-gfm"
},
"state": {
"checkoutState": {
"branch": "gfm",
"revision": "eb9a6a357b6816c68f4b194eaa5b67f3cd1fa5c3"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-cmark"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-crypto",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-crypto.git",
"name": "swift-crypto"
},
"state": {
"checkoutState": {
"revision": "ddb07e896a2a8af79512543b1c7eb9797f8898a5",
"version": "1.1.7"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-crypto"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-docc-plugin",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-docc-plugin",
"name": "SwiftDocCPlugin"
},
"state": {
"checkoutState": {
"revision": "3303b164430d9a7055ba484c8ead67a52f7b74f6",
"version": "1.0.0"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-docc-plugin"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-docc-symbolkit",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-docc-symbolkit",
"name": "SymbolKit"
},
"state": {
"checkoutState": {
"branch": "main",
"revision": "b45d1f2ed151d057b54504d653e0da5552844e34"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-docc-symbolkit"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-lmdb",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-lmdb.git",
"name": "CLMDB"
},
"state": {
"checkoutState": {
"branch": "main",
"revision": "584941b1236b15bad74d8163785d389c028b1ad8"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-lmdb"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-markdown",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-markdown.git",
"name": "swift-markdown"
},
"state": {
"checkoutState": {
"branch": "main",
"revision": "d491147940587dbadfb3472354f4d0c6e063e061"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-markdown"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-nio",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-nio.git",
"name": "swift-nio"
},
"state": {
"checkoutState": {
"revision": "1d425b0851ffa2695d488cce1d68df2539f42500",
"version": "2.31.2"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-nio"
}
]
},
"version": 6
}