Merge remote-tracking branch 'origin/master' into haskell-updates.
This commit is contained in:
@@ -37,8 +37,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
passthru = {
|
||||
isClang = true;
|
||||
} // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
{ emscriptenVersion, stdenv, fetchFromGitHub, cmake, python, gtest, ... }:
|
||||
{ emscriptenVersion, stdenv, fetchFromGitHub, cmake, python, gtest, gccForLibs, ... }:
|
||||
|
||||
let
|
||||
rev = emscriptenVersion;
|
||||
haveGcc = stdenv.cc.isGNU || stdenv.cc.cc ? gcc;
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "emscripten-fastcomp-${rev}";
|
||||
@@ -35,16 +33,14 @@ stdenv.mkDerivation rec {
|
||||
#"-DLLVM_CONFIG=${llvm}/bin/llvm-config"
|
||||
"-DLLVM_BUILD_TESTS=ON"
|
||||
"-DCLANG_INCLUDE_TESTS=ON"
|
||||
] ++ (stdenv.lib.optional (stdenv.isLinux && haveGcc)
|
||||
] ++ (stdenv.lib.optional stdenv.isLinux
|
||||
# necessary for clang to find crtend.o
|
||||
"-DGCC_INSTALL_PREFIX=${gcc}"
|
||||
"-DGCC_INSTALL_PREFIX=${gccForLibs}"
|
||||
);
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
isClang = true;
|
||||
} // stdenv.lib.optionalAttrs haveGcc {
|
||||
inherit gcc;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -87,8 +87,6 @@ let
|
||||
passthru = {
|
||||
isClang = true;
|
||||
inherit llvm;
|
||||
} // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildPackages
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
}:
|
||||
@@ -24,8 +25,8 @@ let
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
in {
|
||||
|
||||
@@ -59,7 +60,8 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
libcxx = null; # libstdcxx is smuggled in with clang.gcc
|
||||
# libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
|
||||
libcxx = null;
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
}:
|
||||
|
||||
let
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
self = stdenv.mkDerivation ({
|
||||
pname = "clang";
|
||||
inherit version;
|
||||
@@ -78,8 +77,6 @@ let
|
||||
passthru = {
|
||||
isClang = true;
|
||||
inherit llvm;
|
||||
} // stdenv.lib.optionalAttrs stdenv.isLinux {
|
||||
inherit gcc;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith
|
||||
, buildPackages
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
}:
|
||||
@@ -24,8 +25,8 @@ let
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
in {
|
||||
|
||||
@@ -51,7 +52,8 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
libcxx = null; # libstdcxx is smuggled in with clang.gcc
|
||||
# libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
|
||||
libcxx = null;
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
}:
|
||||
|
||||
let
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
self = stdenv.mkDerivation ({
|
||||
pname = "clang";
|
||||
inherit version;
|
||||
@@ -78,8 +77,6 @@ let
|
||||
passthru = {
|
||||
isClang = true;
|
||||
inherit llvm;
|
||||
} // stdenv.lib.optionalAttrs stdenv.targetPlatform.isLinux {
|
||||
inherit gcc;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith
|
||||
, buildPackages
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
}:
|
||||
@@ -24,8 +25,8 @@ let
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
in {
|
||||
|
||||
@@ -51,7 +52,8 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
libcxx = null; # libstdcxx is smuggled in with clang.gcc
|
||||
# libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
|
||||
libcxx = null;
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
|
||||
@@ -88,8 +88,6 @@ let
|
||||
passthru = {
|
||||
isClang = true;
|
||||
inherit llvm;
|
||||
} // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildPackages
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
}:
|
||||
@@ -24,8 +25,8 @@ let
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
in {
|
||||
|
||||
@@ -58,7 +59,8 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
libcxx = null; # libstdcxx is smuggled in with clang.gcc
|
||||
# libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
|
||||
libcxx = null;
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
|
||||
@@ -98,8 +98,6 @@ let
|
||||
passthru = {
|
||||
isClang = true;
|
||||
inherit llvm;
|
||||
} // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildPackages
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
}:
|
||||
@@ -24,8 +25,8 @@ let
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
in {
|
||||
|
||||
@@ -59,7 +60,8 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
libcxx = null; # libstdcxx is smuggled in with clang.gcc
|
||||
# libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
|
||||
libcxx = null;
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
|
||||
@@ -93,8 +93,6 @@ let
|
||||
passthru = {
|
||||
isClang = true;
|
||||
inherit llvm;
|
||||
} // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
|
||||
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake
|
||||
{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs
|
||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||
, buildPackages
|
||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||
}:
|
||||
@@ -24,8 +25,8 @@ let
|
||||
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
|
||||
'' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) ''
|
||||
echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags
|
||||
'';
|
||||
in {
|
||||
|
||||
@@ -59,7 +60,8 @@ let
|
||||
|
||||
libstdcxxClang = wrapCCWith rec {
|
||||
cc = tools.clang-unwrapped;
|
||||
libcxx = null; # libstdcxx is smuggled in with clang.gcc
|
||||
# libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
|
||||
libcxx = null;
|
||||
extraPackages = [
|
||||
targetLlvmLibraries.compiler-rt
|
||||
];
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
, cmake
|
||||
, coreutils
|
||||
, glibc
|
||||
, gccForLibs
|
||||
, which
|
||||
, perl
|
||||
, libedit
|
||||
@@ -121,7 +122,7 @@ let
|
||||
cmakeFlags = [
|
||||
"-DGLIBC_INCLUDE_PATH=${stdenv.cc.libc.dev}/include"
|
||||
"-DC_INCLUDE_DIRS=${stdenv.lib.makeSearchPathOutput "dev" "include" devInputs}:${libxml2.dev}/include/libxml2"
|
||||
"-DGCC_INSTALL_PREFIX=${clang.cc.gcc}"
|
||||
"-DGCC_INSTALL_PREFIX=${gccForLibs}"
|
||||
];
|
||||
|
||||
in
|
||||
@@ -199,7 +200,7 @@ stdenv.mkDerivation {
|
||||
substituteInPlace swift/stdlib/public/Platform/CMakeLists.txt \
|
||||
--replace '/usr/include' "${stdenv.cc.libc.dev}/include"
|
||||
substituteInPlace swift/utils/build-script-impl \
|
||||
--replace '/usr/include/c++' "${clang.cc.gcc}/include/c++"
|
||||
--replace '/usr/include/c++' "${gccForLibs}/include/c++"
|
||||
patch -p1 -d swift -i ${./patches/glibc-arch-headers.patch}
|
||||
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}
|
||||
@@ -264,7 +265,7 @@ stdenv.mkDerivation {
|
||||
export NIX_CFLAGS_COMPILE="$(< ${clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
|
||||
# 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.
|
||||
export NIX_LDFLAGS_BEFORE="-rpath ${clang.cc.gcc.lib}/lib -L${clang.cc.gcc.lib}/lib $NIX_LDFLAGS_BEFORE"
|
||||
export NIX_LDFLAGS_BEFORE="-rpath ${gccForLibs.lib}/lib -L${gccForLibs.lib}/lib $NIX_LDFLAGS_BEFORE"
|
||||
# However, we want to use the wrapped compiler whenever possible.
|
||||
export CC="${clang}/bin/clang"
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
, swingSupport ? true }:
|
||||
|
||||
let
|
||||
version = "8.28.0.1";
|
||||
openjdk = "8.0.163";
|
||||
version = "8.48.0.53";
|
||||
openjdk = "8.0.265";
|
||||
|
||||
sha256_linux = "1z8s3a948nvv92wybnhkyr27ipibcy45k0zv5h5gp37ynd91df45";
|
||||
sha256_darwin = "0i0prjijsgg0yyycplpp9rlfl428126rqz7bb31pchrhi6jhk699";
|
||||
sha256_linux = "ed32513524b32a83b3b388831c69d1884df5675bd5069c6d1485fd1a060be209";
|
||||
sha256_darwin = "36f189bfbd0255195848835819377474ba9c1c868e3c204633c451c96e21f30a";
|
||||
|
||||
platform = if stdenv.isDarwin then "macosx" else "linux";
|
||||
hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
|
||||
@@ -29,7 +29,7 @@ in stdenv.mkDerivation {
|
||||
pname = "zulu";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.azul.com/zulu/bin/zulu${version}-jdk${openjdk}-${platform}_x64.${extension}";
|
||||
url = "https://cdn.azul.com/zulu/bin/zulu${version}-ca-jdk${openjdk}-${platform}_x64.${extension}";
|
||||
sha256 = hash;
|
||||
};
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
, swingSupport ? true }:
|
||||
|
||||
let
|
||||
version = "10.1+11";
|
||||
openjdk = "10";
|
||||
version = "11.41.23";
|
||||
openjdk = "11.0.8";
|
||||
|
||||
sha256_linux = "0g51n2zc7inal29n5ly3mrrfj15c7vl87zb6b2r1q67n4mnbrgm8";
|
||||
sha256_darwin = "1c5ib136nv6gz7ij31mg15nhzrl6zr7kp8spm17zwm1ib82bc73y";
|
||||
sha256_linux = "f8aee4ab30ca11ab3c8f401477df0e455a9d6b06f2710b2d1b1ddcf06067bc79";
|
||||
sha256_darwin = "643c6648cc4374f39e830e4fcb3d68f8667893d487c07eb7091df65937025cc3";
|
||||
|
||||
platform = if stdenv.isDarwin then "macosx" else "linux";
|
||||
hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
|
||||
@@ -29,7 +29,7 @@ in stdenv.mkDerivation {
|
||||
pname = "zulu";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.azul.com/zulu/bin/zulu${version}-jdk${openjdk}-${platform}_x64.${extension}";
|
||||
url = "https://cdn.azul.com/zulu/bin/zulu${version}-ca-jdk${openjdk}-${platform}_x64.${extension}";
|
||||
sha256 = hash;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user