diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2018-02-20 20:33:17 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2018-02-20 20:33:40 +0100 |
commit | 1d15dadbec4f3d0a1f98e877e77518afe9245148 (patch) | |
tree | 76b034c0dbd376b7e588802a9946154499631258 /pkgs/development/compilers | |
parent | 43a88e3d8a68a008abea0bca0b17805aa4910764 (diff) | |
parent | b60ef32617383e78c32ca3d69754df5a5f550183 (diff) | |
download | nixpkgs-1d15dadbec4f3d0a1f98e877e77518afe9245148.tar nixpkgs-1d15dadbec4f3d0a1f98e877e77518afe9245148.tar.gz nixpkgs-1d15dadbec4f3d0a1f98e877e77518afe9245148.tar.bz2 nixpkgs-1d15dadbec4f3d0a1f98e877e77518afe9245148.tar.lz nixpkgs-1d15dadbec4f3d0a1f98e877e77518afe9245148.tar.xz nixpkgs-1d15dadbec4f3d0a1f98e877e77518afe9245148.tar.zst nixpkgs-1d15dadbec4f3d0a1f98e877e77518afe9245148.zip |
Merge branch 'master' into staging
Larger rebuilds from master.
Diffstat (limited to 'pkgs/development/compilers')
21 files changed, 270 insertions, 75 deletions
diff --git a/pkgs/development/compilers/haxe/default.nix b/pkgs/development/compilers/haxe/default.nix index c6b4913c623..a420949711e 100644 --- a/pkgs/development/compilers/haxe/default.nix +++ b/pkgs/development/compilers/haxe/default.nix @@ -72,8 +72,8 @@ in { ''; }; haxe_3_4 = generic { - version = "3.4.4"; - sha256 = "057psarsmz8q2y9pqv5221vpdya241gcy8xnl2wg9wyscn6z1lx6"; + version = "3.4.6"; + sha256 = "1myc4b8fwp0f9vky17wv45n34a583f5sjvajsc93f5gm1wanp4if"; prePatch = '' sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' src/main.ml sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/haxelib/client/Main.hx diff --git a/pkgs/development/compilers/llvm/4/clang/default.nix b/pkgs/development/compilers/llvm/4/clang/default.nix index 77863ab4f1e..5531fd2ab77 100644 --- a/pkgs/development/compilers/llvm/4/clang/default.nix +++ b/pkgs/development/compilers/llvm/4/clang/default.nix @@ -43,6 +43,8 @@ let # Patch for standalone doc building sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/Tools.cpp ''; outputs = [ "out" "lib" "python" ]; diff --git a/pkgs/development/compilers/llvm/4/dynamiclibrary-musl.patch b/pkgs/development/compilers/llvm/4/dynamiclibrary-musl.patch new file mode 100644 index 00000000000..d5d7f07b5e1 --- /dev/null +++ b/pkgs/development/compilers/llvm/4/dynamiclibrary-musl.patch @@ -0,0 +1,33 @@ +From d12ecb83d01dcb580dd94f4d57828f33d3eb4c35 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 18 Feb 2016 15:33:21 +0100 +Subject: [PATCH 3/3] Fix DynamicLibrary to build with musl libc + +stdin/out/err is part of the libc and not the kernel so we check for the +specific libc that does the unexpected instead of linux. + +This is needed for making it build with musl libc. +--- + lib/Support/DynamicLibrary.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp +index 9a7aeb5..0c1c8f8 100644 +--- a/lib/Support/DynamicLibrary.cpp ++++ b/lib/Support/DynamicLibrary.cpp +@@ -140,10 +140,10 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) { + #define EXPLICIT_SYMBOL(SYM) \ + if (!strcmp(symbolName, #SYM)) return &SYM + +-// On linux we have a weird situation. The stderr/out/in symbols are both ++// On GNU libc we have a weird situation. The stderr/out/in symbols are both + // macros and global variables because of standards requirements. So, we + // boldly use the EXPLICIT_SYMBOL macro without checking for a #define first. +-#if defined(__linux__) and !defined(__ANDROID__) ++#if defined(__GLIBC__) + { + EXPLICIT_SYMBOL(stderr); + EXPLICIT_SYMBOL(stdout); +-- +2.7.3 + diff --git a/pkgs/development/compilers/llvm/4/libc++/default.nix b/pkgs/development/compilers/llvm/4/libc++/default.nix index db751bcffd4..f28957c3518 100644 --- a/pkgs/development/compilers/llvm/4/libc++/default.nix +++ b/pkgs/development/compilers/llvm/4/libc++/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetch, cmake, llvm, libcxxabi, fixDarwinDylibNames, version }: +{ lib, stdenv, fetch, cmake, python, llvm, libcxxabi, fixDarwinDylibNames, version }: stdenv.mkDerivation rec { name = "libc++-${version}"; @@ -15,6 +15,9 @@ stdenv.mkDerivation rec { ./pthread_mach_thread_np.patch # glibc 2.26 fix ./xlocale-glibc-2.26.patch + ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + ../../libcxx-0001-musl-hacks.patch + ./max_align_t.patch ]; prePatch = '' @@ -24,9 +27,10 @@ stdenv.mkDerivation rec { preConfigure = '' # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR") + '' + lib.optionalString stdenv.hostPlatform.isMusl '' + patchShebangs utils/cat_files.py ''; - - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python; buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; @@ -34,7 +38,7 @@ stdenv.mkDerivation rec { "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCPPABI_VERSION=2" "-DLIBCXX_CXX_ABI=libcxxabi" - ]; + ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1"; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/llvm/4/libc++/max_align_t.patch b/pkgs/development/compilers/llvm/4/libc++/max_align_t.patch new file mode 100644 index 00000000000..060be5b23de --- /dev/null +++ b/pkgs/development/compilers/llvm/4/libc++/max_align_t.patch @@ -0,0 +1,54 @@ +From 917331c88bd2afce0cf0fdbcab55a64541b5bcf0 Mon Sep 17 00:00:00 2001 +From: "David L. Jones" <dlj@google.com> +Date: Fri, 10 Feb 2017 01:27:42 +0000 +Subject: [PATCH] Check for musl-libc's max_align_t in addition to other + variants. + +Summary: +Libcxx will define its own max_align_t when it is not available. However, the +availability checks today only check for Clang's definition and GCC's +definition. In particular, it does not check for musl's definition, which is the +same as GCC's but guarded with a different macro. + +Reviewers: mclow.lists, EricWF + +Reviewed By: EricWF + +Subscribers: chandlerc, cfe-commits + +Differential Revision: https://reviews.llvm.org/D28478 + +git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294683 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + include/cstddef | 3 ++- + include/stddef.h | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/include/cstddef b/include/cstddef +index edd106c00..103898b7d 100644 +--- a/include/cstddef ++++ b/include/cstddef +@@ -48,7 +48,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD + using ::ptrdiff_t; + using ::size_t; + +-#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) ++#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || \ ++ defined(__DEFINED_max_align_t) + // Re-use the compiler's <stddef.h> max_align_t where possible. + using ::max_align_t; + #else +diff --git a/include/stddef.h b/include/stddef.h +index 8841bbea2..faf8552d8 100644 +--- a/include/stddef.h ++++ b/include/stddef.h +@@ -53,7 +53,8 @@ using std::nullptr_t; + } + + // Re-use the compiler's <stddef.h> max_align_t where possible. +-#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) ++#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \ ++ !defined(__DEFINED_max_align_t) + typedef long double max_align_t; + #endif + diff --git a/pkgs/development/compilers/llvm/4/libc++abi.nix b/pkgs/development/compilers/llvm/4/libc++abi.nix index 6a3d9110136..41eb40e124e 100644 --- a/pkgs/development/compilers/llvm/4/libc++abi.nix +++ b/pkgs/development/compilers/llvm/4/libc++abi.nix @@ -14,6 +14,9 @@ stdenv.mkDerivation { export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)" '' + stdenv.lib.optionalString stdenv.isDarwin '' export TRIPLE=x86_64-apple-darwin + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch} + patch -p1 -d $(ls -d libcxx-*) -i ${./libc++/max_align_t.patch} ''; installPhase = if stdenv.isDarwin diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index ceaa45fe8d7..7fd94316d73 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -80,6 +80,9 @@ in stdenv.mkDerivation (rec { ) '' + stdenv.lib.optionalString stdenv.isAarch64 '' patch -p0 < ${../aarch64.patch} + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + patch -p1 -i ${../TLI-musl.patch} + patch -p1 -i ${./dynamiclibrary-musl.patch} ''; # hacky fix: created binaries need to be run before installation @@ -110,6 +113,14 @@ in stdenv.mkDerivation (rec { ++ stdenv.lib.optionals (isDarwin) [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" + ] + ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" + "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" + "-DTARGET_TRIPLE=${stdenv.targetPlatform.config}" + + "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" + "-DCOMPILER_RT_BUILD_XRAY=OFF" ]; postBuild = '' diff --git a/pkgs/development/compilers/llvm/5/clang/default.nix b/pkgs/development/compilers/llvm/5/clang/default.nix index c8eafce4e39..b5aea54b577 100644 --- a/pkgs/development/compilers/llvm/5/clang/default.nix +++ b/pkgs/development/compilers/llvm/5/clang/default.nix @@ -44,6 +44,8 @@ let # Patch for standalone doc building sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp ''; outputs = [ "out" "lib" "python" ]; diff --git a/pkgs/development/compilers/llvm/5/libc++/default.nix b/pkgs/development/compilers/llvm/5/libc++/default.nix index 6f03e225ad6..9ddeea7ef79 100644 --- a/pkgs/development/compilers/llvm/5/libc++/default.nix +++ b/pkgs/development/compilers/llvm/5/libc++/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetch, cmake, llvm, libcxxabi, fixDarwinDylibNames, version }: +{ lib, stdenv, fetch, cmake, python, llvm, libcxxabi, fixDarwinDylibNames, version }: stdenv.mkDerivation rec { name = "libc++-${version}"; @@ -10,6 +10,12 @@ stdenv.mkDerivation rec { export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include" ''; + # on next rebuild, this can be replaced with optionals; for now set to null to avoid + # patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + patches = if stdenv.hostPlatform.isMusl then [ + ../../libcxx-0001-musl-hacks.patch + ] else null; + prePatch = '' substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++" ''; @@ -17,9 +23,10 @@ stdenv.mkDerivation rec { preConfigure = '' # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR") + '' + lib.optionalString stdenv.hostPlatform.isMusl '' + patchShebangs utils/cat_files.py ''; - - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python; buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; @@ -27,7 +34,7 @@ stdenv.mkDerivation rec { "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib" "-DLIBCXX_LIBCPPABI_VERSION=2" "-DLIBCXX_CXX_ABI=libcxxabi" - ]; + ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1"; enableParallelBuilding = true; diff --git a/pkgs/development/compilers/llvm/5/libc++abi.nix b/pkgs/development/compilers/llvm/5/libc++abi.nix index 166f4260291..6d27dcd47b0 100644 --- a/pkgs/development/compilers/llvm/5/libc++abi.nix +++ b/pkgs/development/compilers/llvm/5/libc++abi.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation { export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)" '' + stdenv.lib.optionalString stdenv.isDarwin '' export TRIPLE=x86_64-apple-darwin + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch} ''; installPhase = if stdenv.isDarwin diff --git a/pkgs/development/compilers/llvm/5/llvm.nix b/pkgs/development/compilers/llvm/5/llvm.nix index 1067fa886bc..f574eb05f92 100644 --- a/pkgs/development/compilers/llvm/5/llvm.nix +++ b/pkgs/development/compilers/llvm/5/llvm.nix @@ -74,6 +74,11 @@ in stdenv.mkDerivation (rec { patch -p1 -i ${./compiler-rt-codesign.patch} -d projects/compiler-rt '' + stdenv.lib.optionalString stdenv.isAarch64 '' patch -p0 < ${../aarch64.patch} + '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl '' + patch -p1 -i ${../TLI-musl.patch} + substituteInPlace unittests/Support/CMakeLists.txt \ + --replace "add_subdirectory(DynamicLibrary)" "" + rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp ''; # hacky fix: created binaries need to be run before installation @@ -104,6 +109,14 @@ in stdenv.mkDerivation (rec { ++ stdenv.lib.optionals (isDarwin) [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" + ] + ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" + "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.targetPlatform.config}" + "-DTARGET_TRIPLE=${stdenv.targetPlatform.config}" + + "-DCOMPILER_RT_BUILD_SANITIZERS=OFF" + "-DCOMPILER_RT_BUILD_XRAY=OFF" ]; postBuild = '' diff --git a/pkgs/development/compilers/llvm/TLI-musl.patch b/pkgs/development/compilers/llvm/TLI-musl.patch new file mode 100644 index 00000000000..1a690808663 --- /dev/null +++ b/pkgs/development/compilers/llvm/TLI-musl.patch @@ -0,0 +1,35 @@ +From 5c571082fdaf61f6df19d9b7137dc26d71334058 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Thu, 18 Feb 2016 10:33:04 +0100 +Subject: [PATCH 2/3] Fix build with musl libc + +On musl libc the fopen64 and fopen are the same thing, but for +compatibility they have a `#define fopen64 fopen`. Same applies for +fseek64, fstat64, fstatvfs64, ftello64, lstat64, stat64 and tmpfile64. +--- + include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h +index 7becdf0..7f14427 100644 +--- a/include/llvm/Analysis/TargetLibraryInfo.h ++++ b/include/llvm/Analysis/TargetLibraryInfo.h +@@ -18,6 +18,15 @@ + #include "llvm/IR/Module.h" + #include "llvm/Pass.h" + ++#undef fopen64 ++#undef fseeko64 ++#undef fstat64 ++#undef fstatvfs64 ++#undef ftello64 ++#undef lstat64 ++#undef stat64 ++#undef tmpfile64 ++ + namespace llvm { + /// VecDesc - Describes a possible vectorization of a function. + /// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized +-- +2.7.3 + diff --git a/pkgs/development/compilers/llvm/libcxx-0001-musl-hacks.patch b/pkgs/development/compilers/llvm/libcxx-0001-musl-hacks.patch new file mode 100644 index 00000000000..bcb5ad8cfb8 --- /dev/null +++ b/pkgs/development/compilers/llvm/libcxx-0001-musl-hacks.patch @@ -0,0 +1,39 @@ +From 1c936d7fda3275265e37f93697232a1ed652390f Mon Sep 17 00:00:00 2001 +From: Will Dietz <w@wdtz.org> +Date: Sat, 9 Jul 2016 19:22:54 -0500 +Subject: [PATCH] musl fixes/hacks + +Conflicts: + + include/__config + include/locale + src/locale.cpp +--- + include/locale | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/locale b/include/locale +index 3d804e8..9b01f5b 100644 +--- a/include/locale ++++ b/include/locale +@@ -695,7 +695,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end, + typename remove_reference<decltype(errno)>::type __save_errno = errno; + errno = 0; + char *__p2; +- long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); ++ long long __ll = strtoll(__a, &__p2, __base); + typename remove_reference<decltype(errno)>::type __current_errno = errno; + if (__current_errno == 0) + errno = __save_errno; +@@ -735,7 +735,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end, + typename remove_reference<decltype(errno)>::type __save_errno = errno; + errno = 0; + char *__p2; +- unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE); ++ unsigned long long __ll = strtoull(__a, &__p2, __base); + typename remove_reference<decltype(errno)>::type __current_errno = errno; + if (__current_errno == 0) + errno = __save_errno; +-- +1.7.1 + diff --git a/pkgs/development/compilers/mono/5.8.nix b/pkgs/development/compilers/mono/5.8.nix new file mode 100644 index 00000000000..6db9e19807b --- /dev/null +++ b/pkgs/development/compilers/mono/5.8.nix @@ -0,0 +1,8 @@ +{ stdenv, callPackage, Foundation, libobjc }: + +callPackage ./generic-cmake.nix (rec { + inherit Foundation libobjc; + version = "5.8.0.108"; + sha256 = "177khb06dfll0pcncr84vvibni7f8m5fgb30ndgsdjk25xfcbmzc"; + enableParallelBuilding = false; +}) diff --git a/pkgs/development/compilers/rust/binaryBuild.nix b/pkgs/development/compilers/rust/binaryBuild.nix index 6c6f6b55e1e..1904c12dfdc 100644 --- a/pkgs/development/compilers/rust/binaryBuild.nix +++ b/pkgs/development/compilers/rust/binaryBuild.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeWrapper, cacert, zlib, buildRustPackage, curl, darwin +{ stdenv, fetchurl, makeWrapper, bash, cacert, zlib, buildRustPackage, curl, darwin , version , src , platform @@ -34,9 +34,11 @@ rec { license = [ licenses.mit licenses.asl20 ]; }; - phases = ["unpackPhase" "installPhase" "fixupPhase"]; + buildInputs = [ bash ] ++ stdenv.lib.optional stdenv.isDarwin Security; - buildInputs = stdenv.lib.optional stdenv.isDarwin Security; + postPatch = '' + patchShebangs . + ''; installPhase = '' ./install.sh --prefix=$out \ @@ -86,9 +88,11 @@ rec { license = [ licenses.mit licenses.asl20 ]; }; - phases = ["unpackPhase" "installPhase" "fixupPhase"]; + buildInputs = [ makeWrapper bash ] ++ stdenv.lib.optional stdenv.isDarwin Security; - buildInputs = [ makeWrapper ] ++ stdenv.lib.optional stdenv.isDarwin Security; + postPatch = '' + patchShebangs . + ''; installPhase = '' patchShebangs ./install.sh diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix index 034334f5850..9b488bab5b3 100644 --- a/pkgs/development/compilers/rust/bootstrap.nix +++ b/pkgs/development/compilers/rust/bootstrap.nix @@ -3,16 +3,16 @@ let # Note: the version MUST be one version prior to the version we're # building - version = "1.21.0"; + version = "1.23.0"; - # fetch hashes by running `print-hashes.sh 1.21.0` + # fetch hashes by running `print-hashes.sh 1.23.0` hashes = { - i686-unknown-linux-gnu = "b7caed0f602cdb8ef22e0bfa9125a65bec411e15c0b8901d937e43303ec7dbee"; - x86_64-unknown-linux-gnu = "b41e70e018402bc04d02fde82f91bea24428e6be432f0df12ac400cfb03108e8"; - armv7-unknown-linux-gnueabihf = "416fa6f107ad9e386002e6af1aec495472e2ee489c842183dd429a25b07488d6"; - aarch64-unknown-linux-gnu = "491ee6c43cc672006968d665bd34c94cc2219ef3592d93d38097c97eaaa864c3"; - i686-apple-darwin = "c8b0fabeebcde66b683f3a871187e614e07305adda414c2862cb332aecb2b3bf"; - x86_64-apple-darwin = "75a7f4bd7c72948030bb9e421df27e8a650dea826fb5b836cf59d23d6f985a0d"; + i686-unknown-linux-gnu = "dc5bd0ef47e1036c8ca64676d8967102cb86ce4bf50b90a9845951c3e940423f"; + x86_64-unknown-linux-gnu = "9a34b23a82d7f3c91637e10ceefb424539dcfa327c2dcd292ff10c047b1fdc7e"; + armv7-unknown-linux-gnueabihf = "587027899267f1961520438c2c7f6775fe224160d43ddf07332b9b943a26b08e"; + aarch64-unknown-linux-gnu = "38379fbd976d2286cb73f21466db40a636a583b9f8a80af5eea73617c7912bc7"; + i686-apple-darwin = "4709eb1ad2fb871fdaee4b3449569cef366b0d170453cf17484a12286564f2ad"; + x86_64-apple-darwin = "9274e977322bb4b153f092255ac9bd85041142c73eaabf900cb2ef3d3abb2eba"; }; platform = diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix index 4c397c8c1a4..fecf80a4485 100644 --- a/pkgs/development/compilers/rust/cargo.nix +++ b/pkgs/development/compilers/rust/cargo.nix @@ -1,7 +1,8 @@ { stdenv, fetchFromGitHub, file, curl, pkgconfig, python, openssl, cmake, zlib , makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2, darwin -, version, srcSha, cargoSha256 -, patches ? [] }: +, version +, patches ? [] +, src }: let inherit (darwin.apple_sdk.frameworks) CoreFoundation; @@ -9,17 +10,12 @@ in rustPlatform.buildRustPackage rec { name = "cargo-${version}"; - inherit version; + inherit version src patches; - src = fetchFromGitHub { - owner = "rust-lang"; - repo = "cargo"; - rev = version; - sha256 = srcSha; - }; - - inherit cargoSha256; - inherit patches; + # the rust source tarball already has all the dependencies vendored, no need to fetch them again + cargoVendorDir = "src/vendor"; + preBuild = "cd src; pushd tools/cargo"; + postBuild = "popd"; passthru.rustc = rustc; diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index 413751cf255..dd15580c11b 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -6,21 +6,20 @@ let rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {})); - version = "1.22.1"; -in -rec { + version = "1.24.0"; + cargoVersion = "0.24.0"; + src = fetchurl { + url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; + sha256 = "17v3jpyky8vkkgai5yd2zr8zl87qpgj6dx99gx27x1sf0kv7d0mv"; + }; +in rec { rustc = callPackage ./rustc.nix { - inherit stdenv llvm targets targetPatches targetToolchains rustPlatform version; + inherit stdenv llvm targets targetPatches targetToolchains rustPlatform version src; forceBundledLLVM = true; configureFlags = [ "--release-channel=stable" ]; - src = fetchurl { - url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; - sha256 = "1lrzzp0nh7s61wgfs2h6ilaqi6iq89f1pd1yaf65l87bssyl4ylb"; - }; - patches = [ ./patches/0001-Disable-fragile-tests-libstd-net-tcp-on-Darwin-Linux.patch ] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch @@ -30,10 +29,8 @@ rec { }; cargo = callPackage ./cargo.nix rec { - version = "0.23.0"; - srcSha = "14b2n1msxma19ydchj54hd7f2zdsr524fg133dkmdn7j65f1x6aj"; - cargoSha256 = "1sj59z0w172qvjwg1ma5fr5am9dgw27086xwdnrvlrk4hffcr7y7"; - + version = cargoVersion; + inherit src; inherit stdenv; inherit rustc; # the rustc that will be wrapped by cargo inherit rustPlatform; # used to build cargo diff --git a/pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patch b/pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patch index d29eb16cfe5..bafab0e9ef7 100644 --- a/pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patch +++ b/pkgs/development/compilers/rust/patches/aarch64-disable-test_loading_cosine.patch @@ -1,7 +1,7 @@ -diff --git a/src/librustc_back/dynamic_lib.rs b/src/librustc_back/dynamic_lib.rs +diff --git a/src/librustc_metadata/dynamic_lib.rs b/src/librustc_metadata/dynamic_lib.rs index 1b42fa0..92256dc 100644 ---- a/src/librustc_back/dynamic_lib.rs -+++ b/src/librustc_back/dynamic_lib.rs +--- a/src/librustc_metadata/dynamic_lib.rs ++++ b/src/librustc_metadata/dynamic_lib.rs @@ -80,6 +80,7 @@ mod tests { use std::mem; diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index efed388ce4c..92b149865fa 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -57,9 +57,9 @@ stdenv.mkDerivation { # We need rust to build rust. If we don't provide it, configure will try to download it. configureFlags = configureFlags ++ [ "--enable-local-rust" "--local-rust-root=${rustPlatform.rust.rustc}" "--enable-rpath" ] - ++ [ "--enable-vendor" "--disable-locked-deps" ] + ++ [ "--enable-vendor" ] # ++ [ "--jemalloc-root=${jemalloc}/lib" - ++ [ "--default-linker=${targetPackages.stdenv.cc}/bin/cc" "--default-ar=${targetPackages.stdenv.cc.bintools}/bin/ar" ] + ++ [ "--default-linker=${targetPackages.stdenv.cc}/bin/cc" ] ++ optional (!forceBundledLLVM) [ "--enable-llvm-link-shared" ] ++ optional (targets != []) "--target=${target}" ++ optional (!forceBundledLLVM) "--llvm-root=${llvmShared}"; @@ -72,6 +72,8 @@ stdenv.mkDerivation { passthru.target = target; postPatch = '' + patchShebangs src/etc + # Fix dynamic linking against llvm #${optionalString (!forceBundledLLVM) ''sed -i 's/, kind = \\"static\\"//g' src/etc/mklldeps.py''} @@ -98,19 +100,6 @@ stdenv.mkDerivation { # On Hydra: `TcpListener::bind(&addr)`: Address already in use (os error 98)' sed '/^ *fn fast_rebind()/i#[ignore]' -i src/libstd/net/tcp.rs - # Disable some failing gdb tests. Try re-enabling these when gdb - # is updated past version 7.12. - rm src/test/debuginfo/basic-types-globals.rs - rm src/test/debuginfo/basic-types-mut-globals.rs - rm src/test/debuginfo/c-style-enum.rs - rm src/test/debuginfo/lexical-scopes-in-block-expression.rs - rm src/test/debuginfo/limited-debuginfo.rs - rm src/test/debuginfo/simple-struct.rs - rm src/test/debuginfo/simple-tuple.rs - rm src/test/debuginfo/union-smoke.rs - rm src/test/debuginfo/vec-slices.rs - rm src/test/debuginfo/vec.rs - # Useful debugging parameter # export VERBOSE=1 '' diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix index cd8c839cf4f..4c79fb15c5c 100644 --- a/pkgs/development/compilers/solc/default.nix +++ b/pkgs/development/compilers/solc/default.nix @@ -1,9 +1,7 @@ -{ stdenv, fetchzip, fetchgit, boost, cmake, z3 }: +{ stdenv, fetchzip, fetchurl, boost, cmake, z3 }: let - version = "0.4.19"; - rev = "c4cbbb054b5ed3b8ceaa21ee5b47b0704762ff40"; - sha256 = "1h2ziwdswghj4aa3vd3k3y2ckfiwjk6x38w2kp4m324k2ydxd15c"; + version = "0.4.20"; jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz; jsoncpp = fetchzip { url = jsoncppURL; @@ -15,14 +13,12 @@ stdenv.mkDerivation { name = "solc-${version}"; # Cannot use `fetchFromGitHub' because of submodules - src = fetchgit { - url = "https://github.com/ethereum/solidity"; - inherit rev sha256; + src = fetchurl { + url = "https://github.com/ethereum/solidity/releases/download/v${version}/solidity_${version}.tar.gz"; + sha256 = "0jyqnykj537ksfsf2m6ww9vganmpa6yd5fmlfpa5qm1076kq7zd6"; }; patchPhase = '' - echo >commit_hash.txt '${rev}' - echo >prerelease.txt substituteInPlace cmake/jsoncpp.cmake \ --replace '${jsoncppURL}' ${jsoncpp} substituteInPlace cmake/EthCompilerSettings.cmake \ |