diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-29 15:28:56 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2017-12-29 15:28:56 -0500 |
commit | bc3a6e260a9fc9924f86c36fc522a996df5d3e26 (patch) | |
tree | 21f852d980f96e4e89e4402b5bed5e9eea7b4db4 /pkgs/development/compilers | |
parent | 5d336d36bb0cb20d8966e9e426f8621629ac6e03 (diff) | |
parent | 3afe325a3e2f906ba512fb7a2f28f79496711592 (diff) | |
download | nixlib-bc3a6e260a9fc9924f86c36fc522a996df5d3e26.tar nixlib-bc3a6e260a9fc9924f86c36fc522a996df5d3e26.tar.gz nixlib-bc3a6e260a9fc9924f86c36fc522a996df5d3e26.tar.bz2 nixlib-bc3a6e260a9fc9924f86c36fc522a996df5d3e26.tar.lz nixlib-bc3a6e260a9fc9924f86c36fc522a996df5d3e26.tar.xz nixlib-bc3a6e260a9fc9924f86c36fc522a996df5d3e26.tar.zst nixlib-bc3a6e260a9fc9924f86c36fc522a996df5d3e26.zip |
Merge commit '3afe325a3e2f906ba512fb7a2f28f79496711592' into mingw32-w64-fix
Diffstat (limited to 'pkgs/development/compilers')
46 files changed, 382 insertions, 126 deletions
diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix index b85d32326a1a..cd9a8e514e93 100644 --- a/pkgs/development/compilers/chez/default.nix +++ b/pkgs/development/compilers/chez/default.nix @@ -3,12 +3,12 @@ stdenv.mkDerivation rec { name = "chez-scheme-${version}"; version = "9.5-${dver}"; - dver = "20171012"; + dver = "20171109"; src = fetchgit { url = "https://github.com/cisco/chezscheme.git"; - rev = "adb3b7bb22ddaa1ba91b98b6f4a647427c3a4d9b"; - sha256 = "0hiynf7g0q77ipqxjsqdm2zb0m15bl1hhp615fn3i2hv0qz5a4xr"; + rev = "bc117fd4d567a6863689fec6814882a0f04e577a"; + sha256 = "1adzw7bgdz0p4xmccc6awdkb7bp6xba9mnlsh3r3zvblqfci8i70"; fetchSubmodules = true; }; diff --git a/pkgs/development/compilers/chicken/eggDerivation.nix b/pkgs/development/compilers/chicken/eggDerivation.nix index 97ce9d9be79b..58247e5aeb53 100644 --- a/pkgs/development/compilers/chicken/eggDerivation.nix +++ b/pkgs/development/compilers/chicken/eggDerivation.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation ({ wrapProgram $f \ --set CHICKEN_REPOSITORY $CHICKEN_REPOSITORY \ --prefix CHICKEN_REPOSITORY_EXTRA : "$out/lib/chicken/${toString chicken.binaryVersion}/:$CHICKEN_REPOSITORY_EXTRA" \ - --prefix CHICKEN_INCLUDE_PATH \; \"$CHICKEN_INCLUDE_PATH\;$out/share/\" \ + --prefix CHICKEN_INCLUDE_PATH \; "$CHICKEN_INCLUDE_PATH;$out/share/" \ --prefix PATH : "$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY" done diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 6b817d06553e..7bb0ed1bf617 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -64,7 +64,7 @@ stdenv.mkDerivation rec { installPhase = '' install -Dm755 .build/crystal $out/bin/crystal wrapProgram $out/bin/crystal \ - --suffix CRYSTAL_PATH : $out/lib/crystal \ + --suffix CRYSTAL_PATH : lib:$out/lib/crystal \ --suffix LIBRARY_PATH : $libPath install -dm755 $out/lib/crystal cp -r src/* $out/lib/crystal/ diff --git a/pkgs/development/compilers/dmd/2.067.1.nix b/pkgs/development/compilers/dmd/2.067.1.nix index 6a3cddbd2e50..29a8618dc7b9 100644 --- a/pkgs/development/compilers/dmd/2.067.1.nix +++ b/pkgs/development/compilers/dmd/2.067.1.nix @@ -146,7 +146,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/dmd \ --prefix PATH ":" "${stdenv.cc}/bin" \ - --set CC "$""{CC:-$CC""}" + --set-default CC "$CC" cd $out/bin tee dmd.conf << EOF diff --git a/pkgs/development/compilers/dmd/default.nix b/pkgs/development/compilers/dmd/default.nix index 938dd04904bf..ff19a5b872cc 100644 --- a/pkgs/development/compilers/dmd/default.nix +++ b/pkgs/development/compilers/dmd/default.nix @@ -152,7 +152,7 @@ stdenv.mkDerivation rec { wrapProgram $out/bin/dmd \ --prefix PATH ":" "${stdenv.cc}/bin" \ - --set CC "$""{CC:-$CC""}" + --set-default CC "$CC" cd $out/bin tee dmd.conf << EOF diff --git a/pkgs/development/compilers/dtc/default.nix b/pkgs/development/compilers/dtc/default.nix index e8c36dc7a037..fd02f779b3cf 100644 --- a/pkgs/development/compilers/dtc/default.nix +++ b/pkgs/development/compilers/dtc/default.nix @@ -1,18 +1,35 @@ -{ stdenv, fetchgit, flex, bison }: +{ stdenv, fetchgit, fetchpatch, flex, bison, pkgconfig, python2, swig, which }: stdenv.mkDerivation rec { name = "dtc-${version}"; - version = "1.4.4"; + version = "1.4.5"; src = fetchgit { url = "git://git.kernel.org/pub/scm/utils/dtc/dtc.git"; rev = "refs/tags/v${version}"; - sha256 = "1pxp7700b3za7q4fnsnxx6i8v66rnr8p6lyi7jf684y1hq5ynlnf"; + sha256 = "10y5pbkcj5gkijcgnlvrh6q2prpnvsgihb9asz3zfp66mcjwzsy3"; }; - nativeBuildInputs = [ flex bison ]; + nativeBuildInputs = [ flex bison pkgconfig swig which ]; + buildInputs = [ python2 ]; - installFlags = [ "INSTALL=install" "PREFIX=$(out)" ]; + patches = [ + # Fix 32-bit build + (fetchpatch { + url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=497432fd2131967f349e69dc5d259072151cc4b4"; + sha256 = "1hrvhvz0qkck53mhacrc4rxjrvp34d8dkw7xb5lr4gpg32grvkpq"; + }) + # Fix setup.py + (fetchpatch { + url = "https://github.com/dezgeg/dtc/commit/d94a745148ba5c9198143ccc0f7d877fe498ab73.patch"; + sha256 = "0hpryx04j1swvmjisrfhvss08zzz4nxz9iv72lp4jdgg6vg0argl"; + }) + ]; + postPatch = '' + patchShebangs pylibfdt/ + ''; + + installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ]; meta = with stdenv.lib; { description = "Device Tree Compiler"; diff --git a/pkgs/development/compilers/fstar/default.nix b/pkgs/development/compilers/fstar/default.nix index 3aef4e3ba89d..6df09b402f7c 100644 --- a/pkgs/development/compilers/fstar/default.nix +++ b/pkgs/development/compilers/fstar/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = with ocamlPackages; [ - z3 ocaml findlib ocaml_batteries menhir stdint + z3 ocaml findlib batteries menhir stdint zarith camlp4 yojson pprint ]; diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index b20094249254..fa38ac298553 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -181,7 +181,7 @@ let version = "4.8.5"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; - bootstrap = targetPlatform == hostPlatform && !hostPlatform.isArm && !hostPlatform.isMips; + bootstrap = targetPlatform == hostPlatform; in @@ -340,14 +340,6 @@ stdenv.mkDerivation ({ }" ] ++ - # Optional features - optional (isl != null) "--with-isl=${isl}" ++ - optionals (cloog != null) [ - "--with-cloog=${cloog}" - "--disable-cloog-version-check" - "--enable-cloog-backend=isl" - ] ++ - (if enableMultilib then ["--enable-multilib" "--disable-libquadmath"] else ["--disable-multilib"]) ++ @@ -356,6 +348,14 @@ stdenv.mkDerivation ({ then ["--enable-plugin"] else ["--disable-plugin"]) ++ + # Optional features + optional (isl != null) "--with-isl=${isl}" ++ + optionals (cloog != null) [ + "--with-cloog=${cloog}" + "--disable-cloog-version-check" + "--enable-cloog-backend=isl" + ] ++ + # Java options optionals langJava [ "--with-ecj-jar=${javaEcj}" diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index f28007a6cd14..ed7553d53199 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -485,7 +485,7 @@ stdenv.mkDerivation ({ EXTRA_TARGET_FLAGS = optionals (targetPlatform != hostPlatform && libcCross != null) ([ - "-idirafter ${libcCross.dev}/include" + "-idirafter ${getDev libcCross}/include" ] ++ optionals (! crossStageStatic) [ "-B${libcCross.out}/lib" ]); diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 8cd32ae14da7..7e7e52072aae 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -195,8 +195,6 @@ stdenv.mkDerivation ({ inherit sha256; }; - hardeningDisable = [ "format" ]; - inherit patches; outputs = [ "out" "lib" "man" "info" ]; @@ -205,6 +203,8 @@ stdenv.mkDerivation ({ libc_dev = stdenv.cc.libc_dev; + hardeningDisable = [ "format" ]; + # This should kill all the stdinc frameworks that gcc and friends like to # insert into default search paths. prePatch = stdenv.lib.optionalString hostPlatform.isDarwin '' @@ -352,9 +352,6 @@ stdenv.mkDerivation ({ }" ] ++ - # Optional features - optional (isl != null) "--with-isl=${isl}" ++ - (if enableMultilib then ["--enable-multilib" "--disable-libquadmath"] else ["--disable-multilib"]) ++ @@ -363,6 +360,9 @@ stdenv.mkDerivation ({ then ["--enable-plugin"] else ["--disable-plugin"]) ++ + # Optional features + optional (isl != null) "--with-isl=${isl}" ++ + # Java options optionals langJava [ "--with-ecj-jar=${javaEcj}" @@ -471,7 +471,7 @@ stdenv.mkDerivation ({ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([] ++ optional (zlib != null) zlib - ++ optionals langJava [ boehmgc ] + ++ optional langJava boehmgc ++ optionals javaAwtGtk xlibs ++ optionals javaAwtGtk [ gmp mpfr ] ++ optional (libpthread != null) libpthread diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 9fe49d728fa1..80728379d8ce 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -176,7 +176,7 @@ let version = "6.4.0"; stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; - bootstrap = targetPlatform == hostPlatform; + bootstrap = targetPlatform == hostPlatform; in @@ -386,7 +386,7 @@ stdenv.mkDerivation ({ # Platform-specific flags optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ - optionals (hostPlatform.isSunOS) [ + optionals hostPlatform.isSunOS [ "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" # On Illumos/Solaris GNU as is preferred "--with-gnu-as" "--without-gnu-ld" diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 7389eaecfd6a..f7e79424044e 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -525,6 +525,8 @@ stdenv.mkDerivation ({ stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ optionals (langAda == false) stdenv.lib.platforms.darwin; + + broken = true; }; } diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index cd15a6680c26..736a6edc365b 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -9,7 +9,7 @@ let inherit (bootPkgs) ghc; - version = "8.2.1.20171108"; + version = "8.2.2"; commonBuildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ]; commonPreConfigure = '' @@ -26,14 +26,12 @@ in stdenv.mkDerivation (rec { name = "ghc-${version}"; src = fetchurl { - url = "https://downloads.haskell.org/~ghc/8.2.2-rc3/${name}-src.tar.xz"; - sha256 = "13h55vcrs243bv4hv8i4jq80rsx5hvhi09r3rcs562d8zk7k665w"; + url = "https://downloads.haskell.org/~ghc/8.2.2/${name}-src.tar.xz"; + sha256 = "1z05vkpaj54xdypmaml50hgsdpw29dhbs2r7magx0cm199iw73mv"; }; postPatch = "patchShebangs ."; - patches = [ ./ghc-gold-linker.patch ]; - preConfigure = commonPreConfigure; buildInputs = commonBuildInputs; diff --git a/pkgs/development/compilers/go/1.4.nix b/pkgs/development/compilers/go/1.4.nix index 2a1944debd91..b8c283fef07e 100644 --- a/pkgs/development/compilers/go/1.4.nix +++ b/pkgs/development/compilers/go/1.4.nix @@ -23,6 +23,9 @@ stdenv.mkDerivation rec { hardeningDisable = [ "all" ]; + # The tests try to do stuff with 127.0.0.1 and localhost + __darwinAllowLocalNetworking = true; + # I'm not sure what go wants from its 'src', but the go installation manual # describes an installation keeping the src. preUnpack = '' diff --git a/pkgs/development/compilers/go/1.9.nix b/pkgs/development/compilers/go/1.9.nix index 50fa2d976273..007b81d995b7 100644 --- a/pkgs/development/compilers/go/1.9.nix +++ b/pkgs/development/compilers/go/1.9.nix @@ -118,11 +118,8 @@ stdenv.mkDerivation rec { ./ssl-cert-file-1.9.patch ./creds-test.patch ./remove-test-pie-1.9.patch - - (fetchpatch { - url = "https://github.com/golang/go/commit/29415eb2b92e78481897c4161ba99f5b09fa6102.patch"; - sha256 = "01jkm4b2dazzjnfla7rdd0w2clzplga3zza6ybpmkjkk3i4bp73d"; - }) + ./go-1.9-skip-flaky-19608.patch + ./go-1.9-skip-flaky-20072.patch ]; postPatch = optionalString stdenv.isDarwin '' diff --git a/pkgs/development/compilers/go/go-1.9-skip-flaky-19608.patch b/pkgs/development/compilers/go/go-1.9-skip-flaky-19608.patch new file mode 100644 index 000000000000..a4d9f0674791 --- /dev/null +++ b/pkgs/development/compilers/go/go-1.9-skip-flaky-19608.patch @@ -0,0 +1,12 @@ +diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go +index 7137599..43cca2e 100644 +--- a/src/net/http/serve_test.go ++++ b/src/net/http/serve_test.go +@@ -5361,6 +5361,7 @@ func testServerKeepAlivesEnabled(t *testing.T, h2 bool) { + // the server's doing its 1-byte background read between requests, + // waiting for the connection to maybe close. + func TestServerCancelsReadTimeoutWhenIdle(t *testing.T) { ++ testenv.SkipFlaky(t, 19608) + setParallel(t) + defer afterTest(t) + const timeout = 250 * time.Millisecond diff --git a/pkgs/development/compilers/go/go-1.9-skip-flaky-20072.patch b/pkgs/development/compilers/go/go-1.9-skip-flaky-20072.patch new file mode 100644 index 000000000000..13db40ababc3 --- /dev/null +++ b/pkgs/development/compilers/go/go-1.9-skip-flaky-20072.patch @@ -0,0 +1,20 @@ +diff --git a/src/sync/waitgroup_test.go b/src/sync/waitgroup_test.go +index e3e3096..f80d1e2 100644 +--- a/src/sync/waitgroup_test.go ++++ b/src/sync/waitgroup_test.go +@@ -6,6 +6,7 @@ package sync_test + + import ( + "internal/race" ++ "internal/testenv" + "runtime" + . "sync" + "sync/atomic" +@@ -73,6 +74,7 @@ func TestWaitGroupMisuse2(t *testing.T) { + if runtime.NumCPU() <= 4 { + t.Skip("NumCPU<=4, skipping: this test requires parallelism") + } ++ testenv.SkipFlaky(t, 20072) + defer func() { + err := recover() + if err != "sync: negative WaitGroup counter" && diff --git a/pkgs/development/compilers/hhvm/default.nix b/pkgs/development/compilers/hhvm/default.nix index 3a37ec137580..4159b7bd52b7 100644 --- a/pkgs/development/compilers/hhvm/default.nix +++ b/pkgs/development/compilers/hhvm/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { }) ]; - enableParallelBuilding = false; # occasional build problems; + enableParallelBuilding = true; dontUseCmakeBuildDir = true; NIX_LDFLAGS = "-lpam -L${pam}/lib"; diff --git a/pkgs/development/compilers/jsonnet/default.nix b/pkgs/development/compilers/jsonnet/default.nix index cc19f7afe347..790f9a4827ae 100644 --- a/pkgs/development/compilers/jsonnet/default.nix +++ b/pkgs/development/compilers/jsonnet/default.nix @@ -4,6 +4,7 @@ let version = "0.9.4"; in stdenv.mkDerivation { name = "jsonnet-${version}"; + version = version; src = fetchFromGitHub { rev = "v${version}"; diff --git a/pkgs/development/compilers/kotlin/default.nix b/pkgs/development/compilers/kotlin/default.nix index 37093530a3ca..8f2bbefc2bc7 100644 --- a/pkgs/development/compilers/kotlin/default.nix +++ b/pkgs/development/compilers/kotlin/default.nix @@ -1,12 +1,15 @@ { stdenv, fetchurl, makeWrapper, jre, unzip }: -stdenv.mkDerivation rec { - version = "1.1.51"; +let + version = "1.1.60"; + release = "55"; +in stdenv.mkDerivation rec { + inherit version; name = "kotlin-${version}"; src = fetchurl { - url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip"; - sha256 = "1kbwyldfyyd20rnrl5yvyvqiqj9b3v6543vhlqsh5swhhc9nnd0b"; + url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}-release-${release}.zip"; + sha256 = "04vlhpc92pg0bcgapd5w2b3039sgv52km8i0m4mc5yf0ik6hx1s9"; }; propagatedBuildInputs = [ jre ] ; diff --git a/pkgs/development/compilers/llvm/4/llvm.nix b/pkgs/development/compilers/llvm/4/llvm.nix index 0559a7aee232..33147b07599c 100644 --- a/pkgs/development/compilers/llvm/4/llvm.nix +++ b/pkgs/development/compilers/llvm/4/llvm.nix @@ -81,6 +81,8 @@ in stdenv.mkDerivation rec { substituteInPlace lib/esan/esan_sideline_linux.cpp \ --replace 'struct sigaltstack' 'stack_t' ) + '' + stdenv.lib.optionalString stdenv.isAarch64 '' + patch -p0 < ${../aarch64.patch} ''; # hacky fix: created binaries need to be run before installation diff --git a/pkgs/development/compilers/llvm/5/llvm.nix b/pkgs/development/compilers/llvm/5/llvm.nix index 520e42c33604..8358b6b18c35 100644 --- a/pkgs/development/compilers/llvm/5/llvm.nix +++ b/pkgs/development/compilers/llvm/5/llvm.nix @@ -75,6 +75,8 @@ in stdenv.mkDerivation rec { # Revert compiler-rt commit that makes codesign mandatory patch -p1 -i ${./compiler-rt-codesign.patch} -d projects/compiler-rt + '' + stdenv.lib.optionalString stdenv.isAarch64 '' + patch -p0 < ${../aarch64.patch} ''; # hacky fix: created binaries need to be run before installation diff --git a/pkgs/development/compilers/llvm/aarch64.patch b/pkgs/development/compilers/llvm/aarch64.patch new file mode 100644 index 000000000000..205074e48e4e --- /dev/null +++ b/pkgs/development/compilers/llvm/aarch64.patch @@ -0,0 +1,51 @@ +--- lib/Support/Unix/Memory.inc ++++ lib/Support/Unix/Memory.inc +@@ -126,8 +126,12 @@ + Result.Address = Addr; + Result.Size = NumPages*PageSize; + +- if (PFlags & MF_EXEC) +- Memory::InvalidateInstructionCache(Result.Address, Result.Size); ++ // Rely on protectMappedMemory to invalidate instruction cache. ++ if (PFlags & MF_EXEC) { ++ EC = Memory::protectMappedMemory (Result, PFlags); ++ if (EC != std::error_code()) ++ return MemoryBlock(); ++ } + + return Result; + } +@@ -156,15 +160,31 @@ + return std::error_code(EINVAL, std::generic_category()); + + int Protect = getPosixProtectionFlags(Flags); +- + uintptr_t Start = alignAddr((uint8_t *)M.Address - PageSize + 1, PageSize); + uintptr_t End = alignAddr((uint8_t *)M.Address + M.Size, PageSize); ++ ++ bool InvalidateCache = (Flags & MF_EXEC); ++ ++#if defined(__arm__) || defined(__aarch64__) ++ // Certain ARM implementations treat icache clear instruction as a memory read, ++ // and CPU segfaults on trying to clear cache on !PROT_READ page. Therefore we need ++ // to temporarily add PROT_READ for the sake of flushing the instruction caches. ++ if (InvalidateCache && !(Protect & PROT_READ)) { ++ int Result = ::mprotect((void *)Start, End - Start, Protect | PROT_READ); ++ if (Result != 0) ++ return std::error_code(errno, std::generic_category()); ++ ++ Memory::InvalidateInstructionCache(M.Address, M.Size); ++ InvalidateCache = false; ++ } ++#endif ++ + int Result = ::mprotect((void *)Start, End - Start, Protect); + + if (Result != 0) + return std::error_code(errno, std::generic_category()); + +- if (Flags & MF_EXEC) ++ if (InvalidateCache) + Memory::InvalidateInstructionCache(M.Address, M.Size); + + return std::error_code(); diff --git a/pkgs/development/compilers/mkcl/default.nix b/pkgs/development/compilers/mkcl/default.nix index daebf3b284ee..8ec249ed360a 100644 --- a/pkgs/development/compilers/mkcl/default.nix +++ b/pkgs/development/compilers/mkcl/default.nix @@ -1,16 +1,18 @@ -{ stdenv, fetchgit, makeWrapper, gmp, gcc }: +{ stdenv, fetchFromGitHub, makeWrapper, gmp, gcc }: -stdenv.mkDerivation rec { - v = "1.1.9"; - name = "mkcl-${v}"; +with stdenv.lib; stdenv.mkDerivation rec { + name = "mkcl-${version}"; + version = "1.1.10.2017-11-14"; - src = fetchgit { - url = "https://github.com/jcbeaudoin/mkcl.git"; - rev = "86768cc1dfc2cc9caa1fe9696584bb25ea6c1429"; - sha256 = "1gsvjp9xlnjccg0idi8x8gzkn6hlrqia95jh3zx7snm894503mf1"; + src = fetchFromGitHub { + owner = "jcbeaudoin"; + repo = "mkcl"; + rev = "d3f5afe945907153db2be5a17a419966f83d7653"; + sha256 = "1jfmnh96b5dy1874a9y843vihd14ya4by46rb4h5izldp6x3j3kl"; }; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; + propagatedBuildInputs = [ gmp ]; hardeningDisable = [ "format" ]; @@ -20,16 +22,27 @@ stdenv.mkDerivation rec { "GMP_LDFLAGS=-L${gmp.out}/lib" ]; + # tinycc configure flags copied from the tinycc derivation. + postConfigure = ''( + cd contrib/tinycc + ./configure --cc=cc \ + --elfinterp=$(< $NIX_CC/nix-support/dynamic-linker) \ + --crtprefix=${getLib stdenv.cc.libc}/lib \ + --sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include \ + --libpaths=${getLib stdenv.cc.libc}/lib + )''; + postInstall = '' wrapProgram $out/bin/mkcl --prefix PATH : "${gcc}/bin" ''; + enableParallelBuilding = true; + meta = { description = "ANSI Common Lisp Implementation"; homepage = https://common-lisp.net/project/mkcl/; - license = stdenv.lib.licenses.lgpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [stdenv.lib.maintainers.tohl]; + license = licenses.lgpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ tohl ]; }; } - diff --git a/pkgs/development/compilers/mono/4.8.nix b/pkgs/development/compilers/mono/4.8.nix new file mode 100644 index 000000000000..6d870ae30680 --- /dev/null +++ b/pkgs/development/compilers/mono/4.8.nix @@ -0,0 +1,7 @@ +{ stdenv, callPackage, Foundation, libobjc }: + +callPackage ./generic-cmake.nix (rec { + inherit Foundation libobjc; + version = "4.8.1.0"; + sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq"; +}) diff --git a/pkgs/development/compilers/obliv-c/default.nix b/pkgs/development/compilers/obliv-c/default.nix index f5bc00118a61..774cefb79404 100644 --- a/pkgs/development/compilers/obliv-c/default.nix +++ b/pkgs/development/compilers/obliv-c/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { sha256 = "0jz2ayadx62zv2b5ji947bkvw63axl4a2q70lwli86zgmcl390gf"; }; + patches = [ ./ignore-complex-float128.patch ]; + preBuild = '' patchShebangs . ''; diff --git a/pkgs/development/compilers/obliv-c/ignore-complex-float128.patch b/pkgs/development/compilers/obliv-c/ignore-complex-float128.patch new file mode 100644 index 000000000000..e3a5b74a9cb2 --- /dev/null +++ b/pkgs/development/compilers/obliv-c/ignore-complex-float128.patch @@ -0,0 +1,37 @@ +--- a/src/frontc/clexer.mll ++++ b/src/frontc/clexer.mll +@@ -134,9 +134,11 @@ let init_lexicon _ = + (* WW: see /usr/include/sys/cdefs.h for why __signed and __volatile + * are accepted GCC-isms *) + ("_Bool", fun loc -> BOOL loc); ++ ("_Complex", fun loc -> COMPLEX loc); + ("char", fun loc -> CHAR loc); + ("int", fun loc -> INT loc); + ("float", fun loc -> FLOAT loc); ++ ("__float128", fun loc -> FLOAT128 loc); + ("double", fun loc -> DOUBLE loc); + ("void", fun loc -> VOID loc); + ("enum", fun loc -> ENUM loc); +--- a/src/frontc/cparser.mly ++++ b/src/frontc/cparser.mly +@@ -269,6 +269,8 @@ let oblivState (s:statement): statement = + %token<Cabs.cabsloc> VOLATILE EXTERN STATIC CONST RESTRICT AUTO REGISTER FROZEN + %token<Cabs.cabsloc> THREAD + ++%token<Cabs.cabsloc> COMPLEX FLOAT128 ++ + %token<Cabs.cabsloc> SIZEOF ALIGNOF + + %token EQ PLUS_EQ MINUS_EQ STAR_EQ SLASH_EQ PERCENT_EQ +@@ -1002,7 +1004,11 @@ type_spec: /* ISO 6.7.2 */ + | LONG { Tlong, $1 } + | INT64 { Tint64, $1 } + | FLOAT { Tfloat, $1 } ++| FLOAT128 { Tfloat, $1 } + | DOUBLE { Tdouble, $1 } ++| COMPLEX FLOAT { Tfloat, $2 } ++| COMPLEX FLOAT128{ Tfloat, $2 } ++| COMPLEX DOUBLE { Tdouble, $2 } + | SIGNED { Tsigned, $1 } + | UNSIGNED { Tunsigned, $1 } + | STRUCT id_or_typename diff --git a/pkgs/development/compilers/openjdk-darwin/8.nix b/pkgs/development/compilers/openjdk-darwin/8.nix index 6234b63208cd..cc7c5fd371d2 100644 --- a/pkgs/development/compilers/openjdk-darwin/8.nix +++ b/pkgs/development/compilers/openjdk-darwin/8.nix @@ -33,7 +33,7 @@ let # any package that depends on the JRE has $CLASSPATH set up # properly. mkdir -p $out/nix-support - printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs + printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib diff --git a/pkgs/development/compilers/openjdk-darwin/default.nix b/pkgs/development/compilers/openjdk-darwin/default.nix index 1e8f88beea66..6ecc785be3b9 100644 --- a/pkgs/development/compilers/openjdk-darwin/default.nix +++ b/pkgs/development/compilers/openjdk-darwin/default.nix @@ -23,7 +23,7 @@ let # any package that depends on the JRE has $CLASSPATH set up # properly. mkdir -p $out/nix-support - printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs + printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib diff --git a/pkgs/development/compilers/openjdk/7.nix b/pkgs/development/compilers/openjdk/7.nix index 72f0ba293ba9..372bb1532698 100644 --- a/pkgs/development/compilers/openjdk/7.nix +++ b/pkgs/development/compilers/openjdk/7.nix @@ -184,13 +184,13 @@ let preFixup = '' prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}" patchELF $jre - propagatedNativeBuildInputs+=" $jre" + propagatedBuildInputs+=" $jre" # Propagate the setJavaClassPath setup hook from the JRE so that # any package that depends on the JRE has $CLASSPATH set up # properly. mkdir -p $jre/nix-support - printWords ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs + printWords ${setJavaClassPath} > $jre/nix-support/propagated-build-inputs # Set JAVA_HOME automatically. mkdir -p $out/nix-support diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix index 4499a9126a0c..71ce9271bfa6 100644 --- a/pkgs/development/compilers/openjdk/8.nix +++ b/pkgs/development/compilers/openjdk/8.nix @@ -206,13 +206,13 @@ let preFixup = '' prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}" patchELF $jre - propagatedNativeBuildInputs+=" $jre" + propagatedBuildInputs+=" $jre" # Propagate the setJavaClassPath setup hook from the JRE so that # any package that depends on the JRE has $CLASSPATH set up # properly. mkdir -p $jre/nix-support - printWords ${setJavaClassPath} > $jre/nix-support/propagated-native-build-inputs + printWords ${setJavaClassPath} > $jre/nix-support/propagated-build-inputs # Set JAVA_HOME automatically. mkdir -p $out/nix-support diff --git a/pkgs/development/compilers/openjdk/9.nix b/pkgs/development/compilers/openjdk/9.nix index ce556a32c11d..8697712de988 100644 --- a/pkgs/development/compilers/openjdk/9.nix +++ b/pkgs/development/compilers/openjdk/9.nix @@ -204,14 +204,14 @@ let preFixup = '' prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}" patchELF $jre - propagatedNativeBuildInputs+=" $jre" + propagatedBuildInputs+=" $jre" # Propagate the setJavaClassPath setup hook from the JRE so that # any package that depends on the JRE has $CLASSPATH set up # properly. mkdir -p $jre/nix-support #TODO or printWords? cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040 - echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-native-build-inputs + echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-build-inputs # Set JAVA_HOME automatically. mkdir -p $out/nix-support diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix index 2a00cf5f2d29..c2866446f76f 100644 --- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix +++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix @@ -166,7 +166,7 @@ let result = stdenv.mkDerivation rec { ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins mkdir -p $out/nix-support - printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs + printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs # Set JAVA_HOME automatically. cat <<EOF >> $out/nix-support/setup-hook diff --git a/pkgs/development/compilers/oraclejdk/jdk9-linux.nix b/pkgs/development/compilers/oraclejdk/jdk9-linux.nix index fbda96e14258..29d77a613b38 100644 --- a/pkgs/development/compilers/oraclejdk/jdk9-linux.nix +++ b/pkgs/development/compilers/oraclejdk/jdk9-linux.nix @@ -124,7 +124,7 @@ let result = stdenv.mkDerivation rec { ln -s $out $out/jre mkdir -p $out/nix-support - printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs + printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs # Set JAVA_HOME automatically. cat <<EOF >> $out/nix-support/setup-hook diff --git a/pkgs/development/compilers/orc/default.nix b/pkgs/development/compilers/orc/default.nix index 543fc6dfa48f..525d2bb33a58 100644 --- a/pkgs/development/compilers/orc/default.nix +++ b/pkgs/development/compilers/orc/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "orc-0.4.27"; + name = "orc-0.4.28"; src = fetchurl { url = "https://gstreamer.freedesktop.org/src/orc/${name}.tar.xz"; - sha256 = "14vbwdydwarcvswzf744jdjb3ibhv6k4j6hzdacfan41zic3xrai"; + sha256 = "bfcd7c6563b05672386c4eedfc4c0d4a0a12b4b4775b74ec6deb88fc2bcd83ce"; }; outputs = [ "out" "dev" ]; @@ -15,10 +15,7 @@ stdenv.mkDerivation rec { sed "/^toolsdir=/ctoolsdir=$dev/bin" -i "$dev"/lib/pkgconfig/orc*.pc ''; - # building memcpy_speed.log - # ../test-driver: line 107: 4495 Segmentation fault "$@" > $log_file 2>&1 - # FAIL: memcpy_speed - doCheck = false; # see https://bugzilla.gnome.org/show_bug.cgi?id=728129#c7 + doCheck = true; meta = with stdenv.lib; { description = "The Oil Runtime Compiler"; diff --git a/pkgs/development/compilers/reason/default.nix b/pkgs/development/compilers/reason/default.nix index a4f0442d9d1b..54d39d8fa631 100644 --- a/pkgs/development/compilers/reason/default.nix +++ b/pkgs/development/compilers/reason/default.nix @@ -1,31 +1,32 @@ { stdenv, makeWrapper, buildOcaml, fetchFromGitHub, - ocaml, opam, topkg, menhir, merlin_extend, ppx_tools_versioned, utop }: + ocaml, opam, jbuilder, menhir, merlin_extend, ppx_tools_versioned, utop }: buildOcaml rec { name = "reason"; - version = "3.0.0"; + version = "3.0.3"; src = fetchFromGitHub { owner = "facebook"; repo = "reason"; rev = version; - sha256 = "0vj3y9vlm9gqvj9grmb9n487avbrj4q5611m7wv1bsdpndvv96jr"; + sha256 = "19kp1cnxi6dq89xh07c14q7kzkawbxdkwrvn1rl48l78d04agnxx"; }; propagatedBuildInputs = [ menhir merlin_extend ppx_tools_versioned ]; - buildInputs = [ makeWrapper opam topkg utop menhir opam topkg ]; + buildInputs = [ makeWrapper opam jbuilder utop menhir ]; buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed createFindlibDestdir = true; postPatch = '' - substituteInPlace src/reasonbuild.ml --replace "refmt --print binary" "$out/bin/refmt --print binary" + substituteInPlace src/reasonbuild/myocamlbuild.ml \ + --replace "refmt --print binary" "$out/bin/refmt --print binary" ''; installPhase = '' - ${topkg.installPhase} + ${jbuilder.installPhase} wrapProgram $out/bin/rtop \ --prefix PATH : "${utop}/bin" \ diff --git a/pkgs/development/compilers/rust/binaryBuild.nix b/pkgs/development/compilers/rust/binaryBuild.nix index 37b06555bdbd..8dfe26f72f4a 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 +{ stdenv, fetchurl, makeWrapper, cacert, zlib, buildRustPackage, curl, darwin , version , src , platform @@ -6,12 +6,32 @@ }: let - inherit (stdenv.lib) optionalString; - - needsPatchelf = stdenv.isLinux; + inherit (stdenv.lib) getLib optionalString; + inherit (darwin) libiconv; + inherit (darwin.apple_sdk.frameworks) Security; bootstrapping = versionType == "bootstrap"; + patchBootstrapCargo = '' + ${optionalString (stdenv.isLinux && bootstrapping) '' + patchelf \ + --set-rpath "${stdenv.lib.makeLibraryPath [ curl zlib ]}" \ + --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + "$out/bin/cargo" + ''} + ${optionalString (stdenv.isDarwin && bootstrapping) '' + install_name_tool \ + -change /usr/lib/libiconv.2.dylib '${getLib libiconv}/lib/libiconv.2.dylib' \ + "$out/bin/cargo" + install_name_tool \ + -change /usr/lib/libcurl.4.dylib '${getLib curl}/lib/libcurl.4.dylib' \ + "$out/bin/cargo" + install_name_tool \ + -change /usr/lib/libz.1.dylib '${getLib zlib}/lib/libz.1.dylib' \ + "$out/bin/cargo" + ''} + ''; + installComponents = "rustc,rust-std-${platform}" + (optionalString bootstrapping ",rust-docs,cargo") @@ -34,35 +54,36 @@ rec { license = [ licenses.mit licenses.asl20 ]; }; - phases = ["unpackPhase" "installPhase"]; + phases = ["unpackPhase" "installPhase" "fixupPhase"]; + + propagatedBuildInputs = stdenv.lib.optional stdenv.isDarwin Security; installPhase = '' ./install.sh --prefix=$out \ --components=${installComponents} - ${optionalString (needsPatchelf && bootstrapping) '' + ${optionalString (stdenv.isLinux && bootstrapping) '' patchelf \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - "$out/bin/rustdoc" + "$out/bin/rustc" patchelf \ - --set-rpath "${stdenv.lib.makeLibraryPath [ curl zlib ]}" \ --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - "$out/bin/cargo" + "$out/bin/rustdoc" + ''} + ${optionalString (stdenv.isDarwin && bootstrapping) '' + install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo" + install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo" + install_name_tool -change /usr/lib/libz.1.dylib '${stdenv.lib.getLib zlib}/lib/libz.1.dylib' "$out/bin/cargo" ''} - ${optionalString needsPatchelf '' - patchelf \ - --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - "$out/bin/rustc" + ${patchBootstrapCargo} # Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc # (or similar) here. It causes strange effects where rustc loads # the wrong libraries in a bootstrap-build causing failures that # are very hard to track dow. For details, see # https://github.com/rust-lang/rust/issues/34722#issuecomment-232164943 - ''} ''; - }; cargo = stdenv.mkDerivation rec { @@ -78,19 +99,16 @@ rec { license = [ licenses.mit licenses.asl20 ]; }; + phases = ["unpackPhase" "installPhase" "fixupPhase"]; + buildInputs = [ makeWrapper ]; - phases = ["unpackPhase" "installPhase"]; + propagatedBuildInputs = stdenv.lib.optional stdenv.isDarwin Security; installPhase = '' ./install.sh --prefix=$out \ --components=cargo - ${optionalString needsPatchelf '' - patchelf \ - --set-rpath "${stdenv.lib.makeLibraryPath [ curl zlib ]}" \ - --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - "$out/bin/cargo" - ''} + ${patchBootstrapCargo} wrapProgram "$out/bin/cargo" \ --suffix PATH : "${rustc}/bin" diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix index fbcac09fc458..da9680943b57 100644 --- a/pkgs/development/compilers/rust/bootstrap.nix +++ b/pkgs/development/compilers/rust/bootstrap.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchurl, makeWrapper, cacert, zlib, curl }: +{ stdenv, fetchurl, callPackage }: let # Note: the version MUST be one version prior to the version we're # building - version = "1.19.0"; + version = "1.20.0"; - # fetch hashes by running `print-hashes.sh 1.19.0` + # fetch hashes by running `print-hashes.sh 1.20.0` hashes = { - i686-unknown-linux-gnu = "657b78f3c1a1b4412e12f7278e20cc318022fa276a58f0d38a0d15b515e39713"; - x86_64-unknown-linux-gnu = "30ff67884464d32f6bbbde4387e7557db98868e87fb2afbb77c9b7716e3bff09"; - i686-apple-darwin = "bdfd2189245dc5764c9f26bdba1429c2bf9d57477d8e6e3f0ba42ea0dc63edeb"; - x86_64-apple-darwin = "5c668fb60a3ba3e97dc2cb8967fc4bb9422b629155284dcb89f94d116bb17820"; + i686-unknown-linux-gnu = "abe592e06616cdc2fcca56ddbe482050dd49a1fada35e2af031c64fe6eb14668"; + x86_64-unknown-linux-gnu = "ca1cf3aed73ff03d065a7d3e57ecca92228d35dc36d9274a6597441319f18eb8"; + i686-apple-darwin = "b3c2470f8f132d285e6c989681e251592b67071bc9d93cac8a2e6b66f7bdfcb5"; + x86_64-apple-darwin = "fa1fb8896d5e327cbe6deeb50e6e9a3346de629f2e6bcbd8c10f19f3e2ed67d5"; }; platform = @@ -29,9 +29,8 @@ let sha256 = hashes."${platform}"; }; -in import ./binaryBuild.nix - { inherit stdenv fetchurl makeWrapper cacert zlib curl; +in callPackage ./binaryBuild.nix + { inherit version src platform; buildRustPackage = null; - inherit version src platform; versionType = "bootstrap"; } diff --git a/pkgs/development/compilers/rust/cargo.nix b/pkgs/development/compilers/rust/cargo.nix index 682e85ce867b..fb3001bbf17b 100644 --- a/pkgs/development/compilers/rust/cargo.nix +++ b/pkgs/development/compilers/rust/cargo.nix @@ -1,7 +1,11 @@ { stdenv, fetchFromGitHub, file, curl, pkgconfig, python, openssl, cmake, zlib , makeWrapper, libiconv, cacert, rustPlatform, rustc, libgit2, darwin , version, srcSha, cargoSha256 -, patches ? []}: +, patches ? [] }: + +let + inherit (darwin.apple_sdk.frameworks) CoreFoundation; +in rustPlatform.buildRustPackage rec { name = "cargo-${version}"; @@ -21,13 +25,17 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ file curl python openssl cmake zlib makeWrapper libgit2 ] - # FIXME: Use impure version of CoreFoundation because of missing symbols. - # CFURLSetResourcePropertyForKey is defined in the headers but there's no - # corresponding implementation in the sources from opensource.apple.com. - ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreFoundation libiconv ]; + ++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation libiconv ]; LIBGIT2_SYS_USE_PKG_CONFIG=1; + # FIXME: Use impure version of CoreFoundation because of missing symbols. + # CFURLSetResourcePropertyForKey is defined in the headers but there's no + # corresponding implementation in the sources from opensource.apple.com. + preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' + export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE" + ''; + postInstall = '' # NOTE: We override the `http.cainfo` option usually specified in # `.cargo/config`. This is an issue when users want to specify @@ -36,8 +44,7 @@ rustPlatform.buildRustPackage rec { wrapProgram "$out/bin/cargo" \ --suffix PATH : "${rustc}/bin" \ --set CARGO_HTTP_CAINFO "${cacert}/etc/ssl/certs/ca-bundle.crt" \ - --set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt" \ - ${stdenv.lib.optionalString stdenv.isDarwin ''--suffix DYLD_LIBRARY_PATH : "${rustc}/lib"''} + --set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt" ''; checkPhase = '' diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index c42c958b170c..3973eaff1878 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -6,7 +6,7 @@ let rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {})); - version = "1.20.0"; + version = "1.21.0"; in rec { rustc = callPackage ./rustc.nix { @@ -18,7 +18,7 @@ rec { src = fetchurl { url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; - sha256 = "0542y4rnzlsrricai130mqyxl8r6rd991frb4qsnwb27yigqg91a"; + sha256 = "1yj8lnxybjrybp00fqhxw8fpr641dh8wcn9mk44xjnsb4i1c21qp"; }; patches = [ diff --git a/pkgs/development/compilers/rust/rust-src.nix b/pkgs/development/compilers/rust/rust-src.nix new file mode 100644 index 000000000000..1b819a7f6068 --- /dev/null +++ b/pkgs/development/compilers/rust/rust-src.nix @@ -0,0 +1,11 @@ +{ stdenv, rustc }: + +stdenv.mkDerivation { + name = "rust-src"; + src = rustc.src; + phases = [ "unpackPhase" "installPhase" ]; + installPhase = '' + mv src $out + rm -rf $out/{ci,doc,driver,etc,grammar,llvm,rt,rtstartup,rustllvm,test,tools,vendor} + ''; +} diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 9f96d05c1163..4d92566edd4a 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation { inherit src; - __impureHostDeps = [ "/usr/lib/libedit.3.dylib" ]; + __darwinAllowLocalNetworking = true; NIX_LDFLAGS = optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib"; @@ -109,6 +109,14 @@ stdenv.mkDerivation { # Disable all lldb tests. # error: Can't run LLDB test because LLDB's python path is not set rm -vr src/test/debuginfo/* + + # Disable tests that fail when sandboxing is enabled. + substituteInPlace src/libstd/sys/unix/ext/net.rs \ + --replace '#[test]' '#[test] #[ignore]' + substituteInPlace src/test/run-pass/env-home-dir.rs \ + --replace 'home_dir().is_some()' true + rm -v src/test/run-pass/fds-are-cloexec.rs # FIXME: pipes? + rm -v src/test/run-pass/sync-send-in-std.rs # FIXME: ??? ''; preConfigure = '' diff --git a/pkgs/development/compilers/scala/dotty.nix b/pkgs/development/compilers/scala/dotty.nix new file mode 100644 index 000000000000..cb0c43550022 --- /dev/null +++ b/pkgs/development/compilers/scala/dotty.nix @@ -0,0 +1,46 @@ +{ stdenv, fetchurl, makeWrapper, jre }: + +stdenv.mkDerivation rec { + version = "0.4.0-RC1"; + name = "dotty-${version}"; + + src = fetchurl { + url = "https://github.com/lampepfl/dotty/releases/download/${version}/${name}.tar.gz"; + sha256 = "1d1ab08b85bd6898ce6273fa50818de0d314fc6e5377fb6ee05494827043321b"; + }; + + propagatedBuildInputs = [ jre ] ; + buildInputs = [ makeWrapper ] ; + + installPhase = '' + mkdir -p $out + mv * $out + + mkdir -p $out/shared + mv $out/bin/common $out/shared + ''; + + fixupPhase = '' + for file in $out/bin/* ; do + substituteInPlace $file \ + --replace '$PROG_HOME/bin/common' $out/shared/common + + wrapProgram $file \ + --set JAVA_HOME ${jre} + done + ''; + + meta = with stdenv.lib; { + description = "Research platform for new language concepts and compiler technologies for Scala."; + longDescription = '' + Dotty is a platform to try out new language concepts and compiler technologies for Scala. + The focus is mainly on simplification. We remove extraneous syntax (e.g. no XML literals), + and try to boil down Scala’s types into a smaller set of more fundamental constructs. + The theory behind these constructs is researched in DOT, a calculus for dependent object types. + ''; + homepage = http://dotty.epfl.ch/; + license = licenses.bsd3; + platforms = platforms.all; + maintainers = [maintainers.karolchmist]; + }; +} diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix index baf48d7a532c..57c22f08550f 100644 --- a/pkgs/development/compilers/vala/default.nix +++ b/pkgs/development/compilers/vala/default.nix @@ -12,6 +12,8 @@ let inherit sha256; }; + outputs = [ "out" "devdoc" ]; + nativeBuildInputs = [ pkgconfig flex bison libxslt ] ++ extraNativeBuildInputs; buildInputs = [ glib libiconv ] ++ libintlOrEmpty ++ extraBuildInputs; @@ -65,5 +67,5 @@ in rec { extraBuildInputs = [ graphviz ]; }; - vala = vala_0_34; + vala = vala_0_38; } diff --git a/pkgs/development/compilers/zulu/8.nix b/pkgs/development/compilers/zulu/8.nix index f7638757ff7a..1be0247c5ec3 100644 --- a/pkgs/development/compilers/zulu/8.nix +++ b/pkgs/development/compilers/zulu/8.nix @@ -54,7 +54,7 @@ in stdenv.mkDerivation rec { find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \; mkdir -p $out/nix-support - printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs + printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs # Set JAVA_HOME automatically. cat <<EOF >> $out/nix-support/setup-hook diff --git a/pkgs/development/compilers/zulu/default.nix b/pkgs/development/compilers/zulu/default.nix index 92f1f0a111ed..63551d282475 100644 --- a/pkgs/development/compilers/zulu/default.nix +++ b/pkgs/development/compilers/zulu/default.nix @@ -51,7 +51,7 @@ in stdenv.mkDerivation rec { find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \; mkdir -p $out/nix-support - printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs + printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs # Set JAVA_HOME automatically. cat <<EOF >> $out/nix-support/setup-hook |