2021-01-22 11:25:31 +00:00
|
|
|
|
{ lib, stdenv
|
2017-01-24 14:23:15 +00:00
|
|
|
|
, cmake
|
|
|
|
|
, coreutils
|
|
|
|
|
, glibc
|
2020-06-17 21:33:56 +01:00
|
|
|
|
, gccForLibs
|
2017-01-24 14:23:15 +00:00
|
|
|
|
, which
|
|
|
|
|
, perl
|
|
|
|
|
, libedit
|
|
|
|
|
, ninja
|
2021-01-19 06:50:56 +00:00
|
|
|
|
, pkg-config
|
2017-01-24 14:23:15 +00:00
|
|
|
|
, sqlite
|
|
|
|
|
, swig
|
|
|
|
|
, bash
|
|
|
|
|
, libxml2
|
|
|
|
|
, clang
|
|
|
|
|
, python
|
|
|
|
|
, ncurses
|
|
|
|
|
, libuuid
|
|
|
|
|
, libbsd
|
|
|
|
|
, icu
|
|
|
|
|
, autoconf
|
|
|
|
|
, libtool
|
|
|
|
|
, automake
|
|
|
|
|
, libblocksruntime
|
|
|
|
|
, curl
|
|
|
|
|
, rsync
|
|
|
|
|
, git
|
|
|
|
|
, libgit2
|
|
|
|
|
, fetchFromGitHub
|
2020-02-21 09:02:16 +00:00
|
|
|
|
, fetchpatch
|
2017-01-24 14:23:15 +00:00
|
|
|
|
, findutils
|
2018-02-04 05:38:20 +00:00
|
|
|
|
, makeWrapper
|
2018-02-12 06:31:47 +00:00
|
|
|
|
, gnumake
|
|
|
|
|
, file
|
2017-01-24 14:23:15 +00:00
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
let
|
2019-10-21 10:02:16 +01:00
|
|
|
|
version = "5.1.1";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
|
|
|
|
fetch = { repo, sha256, fetchSubmodules ? false }:
|
|
|
|
|
fetchFromGitHub {
|
|
|
|
|
owner = "apple";
|
|
|
|
|
inherit repo sha256 fetchSubmodules;
|
2019-10-21 09:39:03 +01:00
|
|
|
|
rev = "swift-${version}-RELEASE";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
name = "${repo}-${version}-src";
|
|
|
|
|
};
|
|
|
|
|
|
2018-02-04 05:38:20 +00:00
|
|
|
|
sources = {
|
2017-01-24 14:23:15 +00:00
|
|
|
|
llvm = fetch {
|
|
|
|
|
repo = "swift-llvm";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "00ldd9dby6fl6nk3z17148fvb7g9x4jkn1afx26y51v8rwgm1i7f";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
|
|
|
|
compilerrt = fetch {
|
|
|
|
|
repo = "swift-compiler-rt";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "1431f74l0n2dxn728qp65nc6hivx88fax1wzfrnrv19y77br05wj";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
2019-10-21 09:39:03 +01:00
|
|
|
|
clang = fetch {
|
|
|
|
|
repo = "swift-clang";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "0n7k6nvzgqp6h6bfqcmna484w90db3zv4sh5rdh89wxyhdz6rk4v";
|
|
|
|
|
};
|
|
|
|
|
clangtools = fetch {
|
|
|
|
|
repo = "swift-clang-tools-extra";
|
|
|
|
|
sha256 = "0snp2rpd60z239pr7fxpkj332rkdjhg63adqvqdkjsbrxcqqcgqa";
|
|
|
|
|
};
|
|
|
|
|
indexstore = fetch {
|
|
|
|
|
repo = "indexstore-db";
|
|
|
|
|
sha256 = "1gwkqkdmpd5hn7555dpdkys0z50yh00hjry2886h6rx7avh5p05n";
|
|
|
|
|
};
|
|
|
|
|
sourcekit = fetch {
|
|
|
|
|
repo = "sourcekit-lsp";
|
|
|
|
|
sha256 = "0k84ssr1k7grbvpk81rr21ii8csnixn9dp0cga98h6i1gshn8ml4";
|
2019-10-21 09:39:03 +01:00
|
|
|
|
};
|
2017-01-24 14:23:15 +00:00
|
|
|
|
cmark = fetch {
|
|
|
|
|
repo = "swift-cmark";
|
2019-04-29 16:50:46 +01:00
|
|
|
|
sha256 = "079smm79hbwr06bvghd2sb86b8gpkprnzlyj9kh95jy38xhlhdnj";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
|
|
|
|
lldb = fetch {
|
|
|
|
|
repo = "swift-lldb";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "0j787475f0nlmvxqblkhn3yrvn9qhcb2jcijwijxwq95ar2jdygs";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
|
|
|
|
llbuild = fetch {
|
|
|
|
|
repo = "swift-llbuild";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "1n2s5isxyl6b6ya617gdzjbw68shbvd52vsfqc1256rk4g448v8b";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
|
|
|
|
pm = fetch {
|
|
|
|
|
repo = "swift-package-manager";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "1a49jmag5mpld9zr96g8a773334mrz1c4nyw38gf4p6sckf4jp29";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
|
|
|
|
xctest = fetch {
|
|
|
|
|
repo = "swift-corelibs-xctest";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "0rxy9sq7i0s0kxfkz0hvdp8zyb40h31f7g4m0kry36qk82gzzh89";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
|
|
|
|
foundation = fetch {
|
|
|
|
|
repo = "swift-corelibs-foundation";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "1iiiijsnys0r3hjcj1jlkn3yszzi7hwb2041cnm5z306nl9sybzp";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
|
|
|
|
libdispatch = fetch {
|
|
|
|
|
repo = "swift-corelibs-libdispatch";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "0laqsizsikyjhrzn0rghvxd8afg4yav7cbghvnf7ywk9wc6kpkmn";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
fetchSubmodules = true;
|
|
|
|
|
};
|
|
|
|
|
swift = fetch {
|
|
|
|
|
repo = "swift";
|
2019-10-21 10:02:16 +01:00
|
|
|
|
sha256 = "0m4r1gzrnn0s1c7haqq9dlmvpqxbgbkbdfmq6qaph869wcmvdkvy";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
devInputs = [
|
|
|
|
|
curl
|
|
|
|
|
glibc
|
|
|
|
|
icu
|
|
|
|
|
libblocksruntime
|
|
|
|
|
libbsd
|
|
|
|
|
libedit
|
|
|
|
|
libuuid
|
|
|
|
|
libxml2
|
|
|
|
|
ncurses
|
|
|
|
|
sqlite
|
|
|
|
|
swig
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
|
"-DGLIBC_INCLUDE_PATH=${stdenv.cc.libc.dev}/include"
|
2021-01-22 11:25:31 +00:00
|
|
|
|
"-DC_INCLUDE_DIRS=${lib.makeSearchPathOutput "dev" "include" devInputs}:${libxml2.dev}/include/libxml2"
|
2020-06-17 21:33:56 +01:00
|
|
|
|
"-DGCC_INSTALL_PREFIX=${gccForLibs}"
|
2017-01-24 14:23:15 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
in
|
2019-08-13 22:52:01 +01:00
|
|
|
|
stdenv.mkDerivation {
|
2019-10-21 09:39:03 +01:00
|
|
|
|
name = "swift-${version}";
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
2019-05-04 00:20:10 +01:00
|
|
|
|
nativeBuildInputs = [
|
2017-01-24 14:23:15 +00:00
|
|
|
|
autoconf
|
|
|
|
|
automake
|
|
|
|
|
bash
|
|
|
|
|
cmake
|
|
|
|
|
coreutils
|
2019-05-04 00:20:10 +01:00
|
|
|
|
findutils
|
|
|
|
|
gnumake
|
2017-01-24 14:23:15 +00:00
|
|
|
|
libtool
|
2019-05-04 00:20:10 +01:00
|
|
|
|
makeWrapper
|
2017-01-24 14:23:15 +00:00
|
|
|
|
ninja
|
|
|
|
|
perl
|
2021-01-19 06:50:56 +00:00
|
|
|
|
pkg-config
|
2017-01-24 14:23:15 +00:00
|
|
|
|
python
|
|
|
|
|
rsync
|
|
|
|
|
which
|
2019-05-04 00:20:10 +01:00
|
|
|
|
];
|
|
|
|
|
buildInputs = devInputs ++ [
|
|
|
|
|
clang
|
2018-12-22 11:49:41 +00:00
|
|
|
|
];
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
|
|
|
|
# TODO: Revisit what's propagated and how
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
|
libgit2
|
|
|
|
|
python
|
|
|
|
|
];
|
2021-01-19 06:50:56 +00:00
|
|
|
|
propagatedUserEnvPkgs = [ git pkg-config ];
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ]; # for LLDB
|
|
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
|
mkdir src
|
|
|
|
|
cd src
|
|
|
|
|
export SWIFT_SOURCE_ROOT=$PWD
|
|
|
|
|
|
|
|
|
|
cp -r ${sources.llvm} llvm
|
|
|
|
|
cp -r ${sources.compilerrt} compiler-rt
|
2019-10-21 09:39:03 +01:00
|
|
|
|
cp -r ${sources.clang} clang
|
2019-10-21 10:02:16 +01:00
|
|
|
|
cp -r ${sources.clangtools} clang-tools-extra
|
|
|
|
|
cp -r ${sources.indexstore} indexstore-db
|
|
|
|
|
cp -r ${sources.sourcekit} sourcekit-lsp
|
2017-01-24 14:23:15 +00:00
|
|
|
|
cp -r ${sources.cmark} cmark
|
|
|
|
|
cp -r ${sources.lldb} lldb
|
|
|
|
|
cp -r ${sources.llbuild} llbuild
|
|
|
|
|
cp -r ${sources.pm} swiftpm
|
|
|
|
|
cp -r ${sources.xctest} swift-corelibs-xctest
|
|
|
|
|
cp -r ${sources.foundation} swift-corelibs-foundation
|
|
|
|
|
cp -r ${sources.libdispatch} swift-corelibs-libdispatch
|
|
|
|
|
cp -r ${sources.swift} swift
|
|
|
|
|
|
|
|
|
|
chmod -R u+w .
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
patchPhase = ''
|
2020-06-28 22:15:25 +01:00
|
|
|
|
# Glibc 2.31 fix
|
|
|
|
|
patch -p1 -i ${./patches/swift-llvm.patch}
|
|
|
|
|
|
2017-01-24 14:23:15 +00:00
|
|
|
|
# Just patch all the things for now, we can focus this later
|
|
|
|
|
patchShebangs $SWIFT_SOURCE_ROOT
|
|
|
|
|
|
2018-02-12 06:31:47 +00:00
|
|
|
|
# TODO eliminate use of env.
|
|
|
|
|
find -type f -print0 | xargs -0 sed -i \
|
|
|
|
|
-e 's|/usr/bin/env|${coreutils}/bin/env|g' \
|
|
|
|
|
-e 's|/usr/bin/make|${gnumake}/bin/make|g' \
|
|
|
|
|
-e 's|/bin/mkdir|${coreutils}/bin/mkdir|g' \
|
|
|
|
|
-e 's|/bin/cp|${coreutils}/bin/cp|g' \
|
|
|
|
|
-e 's|/usr/bin/file|${file}/bin/file|g'
|
|
|
|
|
|
2017-01-24 14:23:15 +00:00
|
|
|
|
substituteInPlace swift/stdlib/public/Platform/CMakeLists.txt \
|
|
|
|
|
--replace '/usr/include' "${stdenv.cc.libc.dev}/include"
|
|
|
|
|
substituteInPlace swift/utils/build-script-impl \
|
2020-06-17 21:33:56 +01:00
|
|
|
|
--replace '/usr/include/c++' "${gccForLibs}/include/c++"
|
2018-11-01 14:28:41 +00:00
|
|
|
|
patch -p1 -d swift -i ${./patches/glibc-arch-headers.patch}
|
2017-01-24 14:23:15 +00:00
|
|
|
|
patch -p1 -d swift -i ${./patches/0001-build-presets-linux-don-t-require-using-Ninja.patch}
|
|
|
|
|
patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch}
|
2019-04-29 16:50:46 +01:00
|
|
|
|
patch -p1 -d swift -i ${./patches/0003-build-presets-linux-don-t-build-extra-libs.patch}
|
2017-01-24 14:23:15 +00:00
|
|
|
|
patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch}
|
2018-03-30 08:09:26 +01:00
|
|
|
|
|
|
|
|
|
sed -i swift/utils/build-presets.ini \
|
|
|
|
|
-e 's/^test-installable-package$/# \0/' \
|
|
|
|
|
-e 's/^test$/# \0/' \
|
|
|
|
|
-e 's/^validation-test$/# \0/' \
|
2018-11-01 14:28:41 +00:00
|
|
|
|
-e 's/^long-test$/# \0/' \
|
|
|
|
|
-e 's/^stress-test$/# \0/' \
|
2019-05-04 00:21:01 +01:00
|
|
|
|
-e 's/^test-optimized$/# \0/' \
|
|
|
|
|
\
|
|
|
|
|
-e 's/^swift-install-components=autolink.*$/\0;editor-integration/'
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
2019-10-21 10:02:16 +01:00
|
|
|
|
substituteInPlace clang/lib/Driver/ToolChains/Linux.cpp \
|
|
|
|
|
--replace 'SysRoot + "/lib' '"${glibc}/lib" "'
|
2018-03-30 08:09:26 +01:00
|
|
|
|
substituteInPlace clang/lib/Driver/ToolChains/Linux.cpp \
|
2018-11-01 14:28:41 +00:00
|
|
|
|
--replace 'SysRoot + "/usr/lib' '"${glibc}/lib" "'
|
2019-10-21 09:39:03 +01:00
|
|
|
|
patch -p1 -d clang -i ${./patches/llvm-toolchain-dir.patch}
|
2017-01-24 14:23:15 +00:00
|
|
|
|
patch -p1 -d clang -i ${./purity.patch}
|
|
|
|
|
|
|
|
|
|
# Workaround hardcoded dep on "libcurses" (vs "libncurses"):
|
2019-10-21 09:39:03 +01:00
|
|
|
|
sed -i 's/curses/ncurses/' llbuild/*/*/CMakeLists.txt
|
2019-12-10 14:14:42 +00:00
|
|
|
|
# uuid.h is not part of glibc, but of libuuid
|
|
|
|
|
sed -i 's|''${GLIBC_INCLUDE_PATH}/uuid/uuid.h|${libuuid.dev}/include/uuid/uuid.h|' swift/stdlib/public/Platform/glibc.modulemap.gyb
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
2020-02-21 09:02:16 +00:00
|
|
|
|
# Compatibility with glibc 2.30
|
|
|
|
|
# Adapted from https://github.com/apple/swift-package-manager/pull/2408
|
|
|
|
|
patch -p1 -d swiftpm -i ${./patches/swift-package-manager-glibc-2.30.patch}
|
|
|
|
|
# https://github.com/apple/swift/pull/27288
|
|
|
|
|
patch -p1 -d swift -i ${fetchpatch {
|
|
|
|
|
url = "https://github.com/apple/swift/commit/f968f4282d53f487b29cf456415df46f9adf8748.patch";
|
|
|
|
|
sha256 = "1aa7l66wlgip63i4r0zvi9072392bnj03s4cn12p706hbpq0k37c";
|
|
|
|
|
}}
|
|
|
|
|
|
2017-01-24 14:23:15 +00:00
|
|
|
|
PREFIX=''${out/#\/}
|
2019-10-21 10:02:16 +01:00
|
|
|
|
substituteInPlace indexstore-db/Utilities/build-script-helper.py \
|
|
|
|
|
--replace usr "$PREFIX"
|
|
|
|
|
substituteInPlace sourcekit-lsp/Utilities/build-script-helper.py \
|
|
|
|
|
--replace usr "$PREFIX"
|
2017-01-24 14:23:15 +00:00
|
|
|
|
substituteInPlace swift-corelibs-xctest/build_script.py \
|
|
|
|
|
--replace usr "$PREFIX"
|
2020-08-21 12:31:15 +01:00
|
|
|
|
substituteInPlace swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c \
|
|
|
|
|
--replace "if !TARGET_OS_ANDROID" "if TARGET_OS_MAC || TARGET_OS_BSD"
|
|
|
|
|
substituteInPlace swift-corelibs-foundation/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c \
|
|
|
|
|
--replace "if !TARGET_OS_ANDROID" "if TARGET_OS_MAC || TARGET_OS_BSD"
|
2017-01-24 14:23:15 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2019-10-21 09:39:03 +01:00
|
|
|
|
configurePhase = ''
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
mkdir build install
|
|
|
|
|
export SWIFT_BUILD_ROOT=$PWD/build
|
|
|
|
|
export SWIFT_INSTALL_DIR=$PWD/install
|
|
|
|
|
|
|
|
|
|
export INSTALLABLE_PACKAGE=$PWD/swift.tar.gz
|
|
|
|
|
export NIX_ENFORCE_PURITY=
|
|
|
|
|
|
|
|
|
|
cd $SWIFT_BUILD_ROOT
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
buildPhase = ''
|
2020-07-28 15:01:12 +01:00
|
|
|
|
# explicitly include C++ headers to prevent errors where stdlib.h is not found from cstdlib
|
|
|
|
|
export NIX_CFLAGS_COMPILE="$(< ${clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
|
2019-10-21 09:39:03 +01:00
|
|
|
|
# During the Swift build, a full local LLVM build is performed and the resulting clang is invoked.
|
|
|
|
|
# This compiler is not using the Nix wrappers, so it needs some help to find things.
|
2020-06-17 21:33:56 +01:00
|
|
|
|
export NIX_LDFLAGS_BEFORE="-rpath ${gccForLibs.lib}/lib -L${gccForLibs.lib}/lib $NIX_LDFLAGS_BEFORE"
|
2019-10-21 10:02:16 +01:00
|
|
|
|
# However, we want to use the wrapped compiler whenever possible.
|
|
|
|
|
export CC="${clang}/bin/clang"
|
|
|
|
|
|
|
|
|
|
# fix for https://bugs.llvm.org/show_bug.cgi?id=39743
|
|
|
|
|
# see also https://forums.swift.org/t/18138/15
|
|
|
|
|
export CCC_OVERRIDE_OPTIONS="#x-fmodules s/-fmodules-cache-path.*//"
|
2019-10-21 09:39:03 +01:00
|
|
|
|
|
|
|
|
|
$SWIFT_SOURCE_ROOT/swift/utils/build-script \
|
|
|
|
|
--preset=buildbot_linux \
|
|
|
|
|
installable_package=$INSTALLABLE_PACKAGE \
|
|
|
|
|
install_prefix=$out \
|
|
|
|
|
install_destdir=$SWIFT_INSTALL_DIR \
|
2021-01-22 11:25:31 +00:00
|
|
|
|
extra_cmake_options="${lib.concatStringsSep "," cmakeFlags}"
|
2019-10-21 09:39:03 +01:00
|
|
|
|
'';
|
2019-05-02 11:03:46 +01:00
|
|
|
|
|
2019-12-10 14:14:42 +00:00
|
|
|
|
doCheck = true;
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
2019-05-02 11:03:46 +01:00
|
|
|
|
checkInputs = [ file ];
|
|
|
|
|
|
|
|
|
|
checkPhase = ''
|
2019-12-10 14:14:42 +00:00
|
|
|
|
# FIXME: disable non-working tests
|
|
|
|
|
rm $SWIFT_SOURCE_ROOT/swift/test/Driver/static-stdlib-linux.swift # static linkage of libatomic.a complains about missing PIC
|
|
|
|
|
rm $SWIFT_SOURCE_ROOT/swift/validation-test/Python/build_swift.swift # install_prefix not passed properly
|
|
|
|
|
|
|
|
|
|
# match the swift wrapper in the install phase
|
|
|
|
|
export LIBRARY_PATH=${icu}/lib:${libuuid.out}/lib
|
|
|
|
|
|
2019-05-02 11:03:46 +01:00
|
|
|
|
checkTarget=check-swift-all
|
|
|
|
|
ninjaFlags='-C buildbot_linux/swift-${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}'
|
|
|
|
|
ninjaCheckPhase
|
|
|
|
|
'';
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out
|
|
|
|
|
|
|
|
|
|
# Extract the generated tarball into the store
|
2019-10-21 09:39:03 +01:00
|
|
|
|
tar xf $INSTALLABLE_PACKAGE -C $out --strip-components=3 ''${out/#\/}
|
2018-11-01 14:28:41 +00:00
|
|
|
|
find $out -type d -empty -delete
|
2017-01-24 14:23:15 +00:00
|
|
|
|
|
2019-10-21 10:02:16 +01:00
|
|
|
|
# fix installation weirdness, also present in Apple’s official tarballs
|
|
|
|
|
mv $out/local/include/indexstore $out/include
|
|
|
|
|
rmdir $out/local/include $out/local
|
|
|
|
|
rm -r $out/bin/sdk-module-lists $out/bin/swift-api-checker.py
|
|
|
|
|
|
2018-02-04 05:38:20 +00:00
|
|
|
|
wrapProgram $out/bin/swift \
|
|
|
|
|
--suffix C_INCLUDE_PATH : $out/lib/swift/clang/include \
|
2019-04-29 16:50:46 +01:00
|
|
|
|
--suffix CPLUS_INCLUDE_PATH : $out/lib/swift/clang/include \
|
2019-12-10 14:14:42 +00:00
|
|
|
|
--suffix LIBRARY_PATH : ${icu}/lib:${libuuid.out}/lib
|
2017-01-24 14:23:15 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2019-10-21 09:39:03 +01:00
|
|
|
|
# Hack to avoid build and install directories in RPATHs.
|
2021-01-24 09:19:10 +00:00
|
|
|
|
preFixup = "rm -rf $SWIFT_BUILD_ROOT $SWIFT_INSTALL_DIR";
|
2017-05-16 15:35:52 +01:00
|
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
|
meta = with lib; {
|
2017-01-24 14:23:15 +00:00
|
|
|
|
description = "The Swift Programming Language";
|
2020-04-01 02:11:51 +01:00
|
|
|
|
homepage = "https://github.com/apple/swift";
|
2017-09-24 20:10:20 +01:00
|
|
|
|
maintainers = with maintainers; [ dtzWill ];
|
2017-01-24 14:23:15 +00:00
|
|
|
|
license = licenses.asl20;
|
2017-03-29 13:42:16 +01:00
|
|
|
|
# Swift doesn't support 32bit Linux, unknown on other platforms.
|
2018-03-31 06:19:46 +01:00
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
badPlatforms = platforms.i686;
|
2021-01-29 21:59:37 +00:00
|
|
|
|
broken = true; # 2021-01-29
|
2021-01-29 21:57:07 +00:00
|
|
|
|
knownVulnerabilities = [
|
|
|
|
|
"CVE-2020-9861"
|
|
|
|
|
];
|
2017-01-24 14:23:15 +00:00
|
|
|
|
};
|
|
|
|
|
}
|