git.iko.soy/typeable/nixpkgs
on master help sign in
swift: 5.4.2 -> 5.5.2

Update Swift version.

commiteedda294251b8600f57b8f4111044b6a8b3c1901 authorDaniel Duan <daniel@duan.ca> dateSun 23 Jan 2022, 02:22 (5 years ago) parent053e56b
1 file changed+72−51
pkgs/development/compilers/swift/default.nix+72−51
pkgs/development/compilers/swift/default.nix+72−51
@@ -36,26 +36,50 @@
3636}:
3737
3838let
39− version = "5.4.2";
39+ # The Swift toolchain script builds projects with separate repos. By convention, some of them share
40+ # the same version with the main Swift compiler project per release. We fetch these with
41+ # `fetchSwiftRelease`. The rest have their own versions locked to each Swift release, as defined in the
42+ # Swift compiler repo:
43+ # utils/update_checkout/update_checkout-config.json.
44+ #
45+ # ... among projects listed in that file, we provide our own:
46+ # - CMake
47+ # - ninja
48+ # - icu
49+ #
50+ # ... we'd like to include the following in the future:
51+ # - stress-tester
52+ # - integration-tests
53+
54+ versions = {
55+ swift = "5.5.2";
56+ yams = "4.0.2";
57+ argumentParser = "0.4.3";
58+ format = "swift-5.5-branch";
59+ crypto = "1.1.5";
60+ };
4061
41− # These dependency versions can be found in utils/update_checkout/update-checkout-config.json.
42− swiftArgumentParserVersion = "0.3.0";
43− yamsVersion = "3.0.1";
44− swiftFormatVersion = "0.50400.0";
62+ fetchAppleRepo = { repo, rev, sha256 }:
63+ fetchFromGitHub {
64+ owner = "apple";
65+ inherit repo rev sha256;
66+ name = "${repo}-${rev}-src";
67+ };
4568
4669 fetchSwiftRelease = { repo, sha256, fetchSubmodules ? false }:
4770 fetchFromGitHub {
4871 owner = "apple";
4972 inherit repo sha256 fetchSubmodules;
50− rev = "swift-${version}-RELEASE";
51− name = "${repo}-${version}-src";
73+ rev = "swift-${versions.swift}-RELEASE";
74+ name = "${repo}-${versions.swift}-src";
5275 };
5376
54− # Sources based on utils/update_checkout/update_checkout-config.json.
5577 sources = {
78+ # Projects that share `versions.swift` for each release.
79+
5680 swift = fetchSwiftRelease {
5781 repo = "swift";
58− sha256 = "0qrkqkwpmk312fi12kwwyihin01qb7sphhdz5c6an8j1rjfd9wbv";
82+ sha256 = "1a9ja3r6ap4cappbvlk18krlvwi0q75z21j5yx5rhbnw4ihh7lda";
5983 };
6084 cmark = fetchSwiftRelease {
6185 repo = "swift-cmark";
@@ -63,75 +87,73 @@ let
6387 };
6488 llbuild = fetchSwiftRelease {
6589 repo = "swift-llbuild";
66− sha256 = "0d7sj5a9b5c1ry2209cpccic5radf9s48sp1lahqzmd1pdx3n7pi";
67− };
68− argumentParser = fetchFromGitHub {
69− owner = "apple";
70− repo = "swift-argument-parser";
71− rev = swiftArgumentParserVersion;
72− sha256 = "15vv7hnffa84142q97dwjcn196p2bg8nfh89d6nnix0i681n1qfd";
73− name = "swift-argument-parser-${swiftArgumentParserVersion}";
90+ sha256 = "1xmiv7yp9r9iscx3fc3zdp25mriz134k9ny2rchxzi4kifz8h0zc";
7491 };
7592 driver = fetchSwiftRelease {
7693 repo = "swift-driver";
77− sha256 = "1j08273haqv7786rkwsmw7g103glfwy1d2807490id9lagq3r66z";
94+ sha256 = "1pb7fidgdqxzragqkillkv03vdilrwmcx6x2r4czqvdqj37gy6b6";
7895 };
7996 toolsSupportCore = fetchSwiftRelease {
8097 repo = "swift-tools-support-core";
81− sha256 = "07gm28ki4px7xzrplvk9nd1pp5r9nyi87l21i0rcbb3r6wrikxb4";
98+ sha256 = "0a63193nycir4lffvmb3ky8cfly5kdr2libki2gx4fn6fxmb3a2f";
8299 };
83100 swiftpm = fetchSwiftRelease {
84101 repo = "swift-package-manager";
85− sha256 = "05linnzlidxamzl3723zhyrfm24pk2cf1x66a3nk0cxgnajw0vzx";
102+ sha256 = "0hdjvb2asfi6h3x9bjssxkc3bgjn3idlmyga3dl3lscfq88hjxr9";
86103 };
87104 syntax = fetchSwiftRelease {
88105 repo = "swift-syntax";
89− sha256 = "1y9agx9bg037xjhkwc28xm28kjyqydgv21s4ijgy5l51yg1g0daj";
106+ sha256 = "0kdgh9a8n28yh12hj8lbz2j66ag83l0lcfyfdg7zdr614zs6i3p1";
90107 };
91− # TODO: possibly re-add stress-tester.
92108 corelibsXctest = fetchSwiftRelease {
93109 repo = "swift-corelibs-xctest";
94− sha256 = "00c68580yr12yxshl0hxyhp8psm15fls3c7iqp52hignyl4v745r";
110+ sha256 = "12fp3xzsqwcrmyc55h91d3dm64wn3wln47x2fl7sj0s8cn7q12b3";
95111 };
96112 corelibsFoundation = fetchSwiftRelease {
97113 repo = "swift-corelibs-foundation";
98− sha256 = "1jyadm2lm7hhik8n8wacfiffpdwqsgnilwmcw22qris5s2drj499";
114+ sha256 = "1f7qcdx8597gwqa9pwl38d31w6w4d84c5hadj4ycj99msrm2f32x";
99115 };
100116 corelibsLibdispatch = fetchSwiftRelease {
101117 repo = "swift-corelibs-libdispatch";
102− sha256 = "1s46c0hrxi42r43ff5f1pq2imb3hs05adfpwfxkilgqyb5svafsp";
118+ sha256 = "1bim5x9z9bqfgs6gdm4nlz1zrwl2x7xh4dn6i5md9ygsplr4ibzf";
103119 fetchSubmodules = true;
104120 };
105− # TODO: possibly re-add integration-tests.
106− # Linux does not support Xcode playgrounds.
107− # We provide our own ninja.
108− # We provider our own icu.
109− yams = fetchFromGitHub {
110− owner = "jpsim";
111− repo = "Yams";
112− rev = yamsVersion;
113− sha256 = "13md54y7lalrpynrw1s0w5yw6rrjpw46fml9dsk2m3ph1bnlrqrq";
114− name = "Yams-${yamsVersion}";
115− };
116− # We provide our own CMake.
117121 indexstoreDb = fetchSwiftRelease {
118122 repo = "indexstore-db";
119− sha256 = "1ap3hiq2jd3cn10d8d674xysq27by878mvq087a80681r8cdivn3";
123+ sha256 = "1l1xlzf5kx7x80kf4b7r36glv0jc64d08d1688kmzjq1cfgn6gm2";
120124 };
121125 sourcekitLsp = fetchSwiftRelease {
122126 repo = "sourcekit-lsp";
123− sha256 = "02m9va0lsn2hnwkmgrbgj452sbyaswwmq14lqvxgnb7gssajv4gc";
124− };
125− format = fetchFromGitHub {
126− owner = "apple";
127− repo = "swift-format";
128− rev = swiftFormatVersion;
129− sha256 = "0skmmggsh31f3rnqcrx43178bc7scrjihibnwn68axagasgbqn4k";
130− name = "swift-format-${swiftFormatVersion}-src";
127+ sha256 = "00fcmd7x5v62n6ajsc0dmzwz6nzy2p72mcs9w6p90adcx7pffqkn";
131128 };
132129 llvmProject = fetchSwiftRelease {
133130 repo = "llvm-project";
134− sha256 = "166hd9d2i55zj70xjb1qmbblbfyk8hdb2qv974i07j6cvynn30lm";
131+ sha256 = "1gvqps5f9jh6lbhcjh1fyzp3bc0h9chbljzaspcrdi2qp878prlx";
132+ };
133+
134+ # Projects that have their own versions during each release
135+
136+ argumentParser = fetchAppleRepo {
137+ repo = "swift-argument-parser";
138+ rev = "${versions.argumentParser}";
139+ sha256 = "1jkq72fphxzsnynjxk72azp0iz5r2ji7adxrz6w1y2a19pgjdqrp";
140+ };
141+ format = fetchAppleRepo {
142+ repo = "swift-format";
143+ rev = "${versions.format}";
144+ sha256 = "1hg888ps3fk23q2zf6djkvxyk6zndqvwypmy0s800hmnyf0hzgv4";
145+ };
146+ crypto = fetchAppleRepo {
147+ repo = "swift-crypto";
148+ rev = "${versions.crypto}";
149+ sha256 = "0918pj3x3wgli3bnrjbvpzck2n6qz5n6f4yc5kljky45wd15f34g";
150+ };
151+ yams = fetchFromGitHub {
152+ owner = "jpsim";
153+ repo = "Yams";
154+ rev = versions.yams;
155+ sha256 = "1nk9b7l6m3wwjkl81npl2l1iwpsxaxb9za53jpwwsbbi1h1h4fbi";
156+ name = "Yams-${versions.yams}-src";
135157 };
136158 };
137159
@@ -160,7 +182,7 @@ let
160182
161183in
162184stdenv.mkDerivation {
163− name = "swift-${version}";
185+ name = "swift-${versions.swift}";
164186
165187 nativeBuildInputs = [
166188 autoconf
@@ -207,15 +229,14 @@ stdenv.mkDerivation {
207229 cp -r ${sources.toolsSupportCore} swift-tools-support-core
208230 cp -r ${sources.swiftpm} swiftpm
209231 cp -r ${sources.syntax} swift-syntax
210− # TODO: possibly re-add stress-tester.
211232 cp -r ${sources.corelibsXctest} swift-corelibs-xctest
212233 cp -r ${sources.corelibsFoundation} swift-corelibs-foundation
213234 cp -r ${sources.corelibsLibdispatch} swift-corelibs-libdispatch
214− # TODO: possibly re-add integration-tests.
215235 cp -r ${sources.yams} yams
216236 cp -r ${sources.indexstoreDb} indexstore-db
217237 cp -r ${sources.sourcekitLsp} sourcekit-lsp
218238 cp -r ${sources.format} swift-format
239+ cp -r ${sources.crypto} swift-crypto
219240 cp -r ${sources.llvmProject} llvm-project
220241
221242 chmod -R u+w .
@@ -378,7 +399,7 @@ stdenv.mkDerivation {
378399 meta = with lib; {
379400 description = "The Swift Programming Language";
380401 homepage = "https://github.com/apple/swift";
381− maintainers = with maintainers; [ dtzWill trepetti ];
402+ maintainers = with maintainers; [ dtzWill trepetti dduan ];
382403 license = licenses.asl20;
383404 # Swift doesn't support 32-bit Linux, unknown on other platforms.
384405 platforms = platforms.linux;