diff options
Diffstat (limited to 'pkgs/development/compilers')
23 files changed, 289 insertions, 90 deletions
diff --git a/pkgs/development/compilers/aspectj/default.nix b/pkgs/development/compilers/aspectj/default.nix index 264e76d038ca..f9e792260335 100644 --- a/pkgs/development/compilers/aspectj/default.nix +++ b/pkgs/development/compilers/aspectj/default.nix @@ -1,12 +1,12 @@ {stdenv, fetchurl, jre}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "aspectj-1.5.2"; builder = ./builder.sh; src = fetchurl { - url = http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/aspectj/aspectj-1.5.2.jar; - md5 = "64245d451549325147e3ca1ec4c9e57c"; + url = "http://archive.eclipse.org/tools/aspectj/${name}.jar"; + sha256 = "1b3mx248dc1xka1vgsl0jj4sm0nfjsqdcj9r9036mvixj1zj3nmh"; }; inherit jre; diff --git a/pkgs/development/compilers/ats2/default.nix b/pkgs/development/compilers/ats2/default.nix index 59ce006e8357..3abd5c8c82a9 100644 --- a/pkgs/development/compilers/ats2/default.nix +++ b/pkgs/development/compilers/ats2/default.nix @@ -3,11 +3,11 @@ , withContrib ? true }: let - versionPkg = "0.2.13" ; + versionPkg = "0.3.0" ; contrib = fetchurl { url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-contrib-${versionPkg}.tgz" ; - sha256 = "1hsqvdwiydks46sfjmm04rmjcx5v25xpjgnq0b96psrdbd0ky2kf" ; + sha256 = "1s4yscisn9gsr692jmh4y5mz03012pv84cm7l5n51v83wc08fks0" ; }; postInstallContrib = stdenv.lib.optionalString withContrib @@ -31,9 +31,11 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-${version}.tgz"; - sha256 = "01rkybkwgbpx6blv72n46ml9ii3p6kpxbpczsrpbjkqmf22b4vii"; + sha256 = "1knf03r8a5sis7n8rw54flf1lxfbr3prywxb1czcdp6hsbcd1v1d"; }; + patches = [ ./install-postiats-contrib.patch ]; + buildInputs = [ gmp ]; setupHook = with stdenv.lib; diff --git a/pkgs/development/compilers/ats2/install-postiats-contrib.patch b/pkgs/development/compilers/ats2/install-postiats-contrib.patch new file mode 100644 index 000000000000..cb280d028b52 --- /dev/null +++ b/pkgs/development/compilers/ats2/install-postiats-contrib.patch @@ -0,0 +1,19 @@ +Install the parts of the contrib that have been moved to Postiats. +diff -Naur ATS2-Postiats-0.3.0-upstream/Makefile_dist ATS2-Postiats-0.3.0/Makefile_dist +--- ATS2-Postiats-0.3.0-upstream/Makefile_dist 2017-01-20 10:23:54.000000000 -0400 ++++ ATS2-Postiats-0.3.0/Makefile_dist 2017-01-21 13:14:27.614723335 -0400 +@@ -124,12 +124,12 @@ + cd "$(abs_top_srcdir)" && \ + $(MKDIR_P) $(PATSLIBHOME2)/bin && \ + if [ ! -d $(bindir2) ] ; then $(MKDIR_P) $(bindir2) ; fi && \ +- for x in share ccomp prelude libc libats ; do \ ++ for x in share ccomp prelude libc libats contrib atscntrb ; do \ + find "$$x" -type d -exec $(MKDIR_P) $(PATSLIBHOME2)/\{} \; -print; \ + done + + install_files_0: install_dirs ; \ +- for x in share ccomp/runtime prelude libc libats ; do \ ++ for x in share ccomp/runtime prelude libc libats contrib atscntrb ; do \ + cd "$(abs_top_srcdir)" && \ + $(INSTALL) -d $(PATSLIBHOME2)/"$$x" && \ + find "$$x" -type l -exec cp -d \{} $(PATSLIBHOME2)/\{} \; -print && \ diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 7162f85e05d3..6202a8e968b3 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm_39, makeWrapper }: stdenv.mkDerivation rec { - version = "0.20.4"; + version = "0.20.5"; name = "crystal-${version}-1"; arch = { @@ -14,15 +14,15 @@ stdenv.mkDerivation rec { url = "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-1-${arch}.tar.gz"; sha256 = { - "x86_64-linux" = "cdc11c30235f8bd3b89e1fc13b56838f99d585715fb66563d6599026f5393e37"; - "i686-linux" = "93e7df2bea3220728987a49a2f93d1c615e2ccae63843e0259a5d891c53a0b80"; - "x86_64-darwin" = "3fd291a4a5c9eccdea933a9df25446c90d80660a17e89f83503fcb5b6deba03e"; + "x86_64-linux" = "fd077c0a727419e131b1be6198a5aa5820ecbdaafd2d2bb38be5716ba75b5100"; + "i686-linux" = "e3a890f11833c57c9004655d108f981c7c630cd7a939f828d9a6c571705bc3e7"; + "x86_64-darwin" = "79462c8ff994b36cff219c356967844a17e8cb2817bb24a196a960a08b8c9e47"; }."${stdenv.system}" or (throw "system ${stdenv.system} not supported"); }; src = fetchurl { url = "https://github.com/crystal-lang/crystal/archive/${version}.tar.gz"; - sha256 = "fd099f278b71bbb5cad1927c93933d1feba554fbf8f6f4ab9165f535765f5e31"; + sha256 = "ee1e5948c6e662ccb1e62671cf2c91458775b559b23d74ab226dc2a2d23f7707"; }; # crystal on Darwin needs libiconv to build diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix index 5979eba3e100..ba8401b9b092 100644 --- a/pkgs/development/compilers/ghc/8.0.2.nix +++ b/pkgs/development/compilers/ghc/8.0.2.nix @@ -4,13 +4,6 @@ let inherit (bootPkgs) ghc; - - fetchFilteredPatch = args: fetchurl (args // { - downloadToTemp = true; - postFetch = '' - ${patchutils}/bin/filterdiff --clean --strip-match=1 -x 'testsuite/*' "$downloadedFile" > "$out" - ''; # fix syntax highlighting: */ - }); in stdenv.mkDerivation rec { version = "8.0.2"; diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 971365eda48f..e7f4335d6f6e 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -1,5 +1,6 @@ { stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils -, autoconf, automake, happy, alex, python3, crossSystem, selfPkgs, cross ? null +, autoconf, automake, happy, alex, python3, buildPlatform, targetPlatform +, selfPkgs, cross ? null }: let @@ -68,9 +69,9 @@ in stdenv.mkDerivation (rec { passthru = { inherit bootPkgs; - } // stdenv.lib.optionalAttrs (crossSystem != null) { + } // stdenv.lib.optionalAttrs (targetPlatform != buildPlatform) { crossCompiler = selfPkgs.ghc.override { - cross = crossSystem; + cross = targetPlatform; bootPkgs = selfPkgs; }; }; diff --git a/pkgs/development/compilers/go/1.4.nix b/pkgs/development/compilers/go/1.4.nix index eb4c64ed3340..b703a92f3ea5 100644 --- a/pkgs/development/compilers/go/1.4.nix +++ b/pkgs/development/compilers/go/1.4.nix @@ -77,6 +77,29 @@ stdenv.mkDerivation rec { # fails when running inside tmux sed -i '/TestNohup/areturn' src/os/signal/signal_test.go + # unix socket tests fail on darwin + sed -i '/TestConnAndListener/areturn' src/net/conn_test.go + sed -i '/TestPacketConn/areturn' src/net/conn_test.go + sed -i '/TestPacketConn/areturn' src/net/packetconn_test.go + sed -i '/TestConnAndPacketConn/areturn' src/net/packetconn_test.go + sed -i '/TestUnixListenerSpecificMethods/areturn' src/net/packetconn_test.go + sed -i '/TestUnixConnSpecificMethods/areturn' src/net/packetconn_test.go + sed -i '/TestUnixListenerSpecificMethods/areturn' src/net/protoconn_test.go + sed -i '/TestUnixConnSpecificMethods/areturn' src/net/protoconn_test.go + sed -i '/TestStreamConnServer/areturn' src/net/server_test.go + sed -i '/TestReadUnixgramWithUnnamedSocket/areturn' src/net/unix_test.go + sed -i '/TestReadUnixgramWithZeroBytesBuffer/areturn' src/net/unix_test.go + sed -i '/TestUnixgramWrite/areturn' src/net/unix_test.go + sed -i '/TestUnixConnLocalAndRemoteNames/areturn' src/net/unix_test.go + sed -i '/TestUnixgramConnLocalAndRemoteNames/areturn' src/net/unix_test.go + sed -i '/TestWithSimulated/areturn' src/log/syslog/syslog_test.go + sed -i '/TestFlap/areturn' src/log/syslog/syslog_test.go + sed -i '/TestNew/areturn' src/log/syslog/syslog_test.go + sed -i '/TestNewLogger/areturn' src/log/syslog/syslog_test.go + sed -i '/TestDial/areturn' src/log/syslog/syslog_test.go + sed -i '/TestWrite/areturn' src/log/syslog/syslog_test.go + sed -i '/TestConcurrentWrite/areturn' src/log/syslog/syslog_test.go + sed -i '/TestConcurrentReconnect/areturn' src/log/syslog/syslog_test.go # remove IP resolving tests, on darwin they can find fe80::1%lo while expecting ::1 sed -i '/TestResolveIPAddr/areturn' src/net/ipraw_test.go diff --git a/pkgs/development/compilers/go/1.6.nix b/pkgs/development/compilers/go/1.6.nix index 982446f4fdb1..7d78f5efd104 100644 --- a/pkgs/development/compilers/go/1.6.nix +++ b/pkgs/development/compilers/go/1.6.nix @@ -89,7 +89,7 @@ stdenv.mkDerivation rec { sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go sed -i '/TestRead0/areturn' src/os/os_test.go sed -i '/TestNohup/areturn' src/os/signal/signal_test.go - sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go + rm src/crypto/x509/root_darwin_test.go src/crypto/x509/verify_test.go sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/areturn' src/cmd/go/go_test.go sed -i '/TestBuildDashIInstallsDependencies/areturn' src/cmd/go/go_test.go diff --git a/pkgs/development/compilers/jikes/default.nix b/pkgs/development/compilers/jikes/default.nix index 1423bc8d51ef..1e202160b3c5 100644 --- a/pkgs/development/compilers/jikes/default.nix +++ b/pkgs/development/compilers/jikes/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation { name = "jikes-1.22"; src = fetchurl { url = mirror://sourceforge/jikes/jikes-1.22.tar.bz2; - md5 = "cda958c7fef6b43b803e1d1ef9afcb85"; + sha256 = "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"; }; meta = { diff --git a/pkgs/development/compilers/matter-compiler/default.nix b/pkgs/development/compilers/matter-compiler/default.nix index 12da620fe5bd..58fb0ca22d7c 100644 --- a/pkgs/development/compilers/matter-compiler/default.nix +++ b/pkgs/development/compilers/matter-compiler/default.nix @@ -5,9 +5,7 @@ bundlerEnv { name = "matter_compiler-0.5.1"; inherit ruby; - gemfile = ./Gemfile; - lockfile = ./Gemfile.lock; - gemset = ./gemset.nix; + gemdir = ./.; meta = with lib; { description = '' diff --git a/pkgs/development/compilers/meta-environment/meta-build-env/default.nix b/pkgs/development/compilers/meta-environment/meta-build-env/default.nix index 105844887f1d..3869bdad84f6 100644 --- a/pkgs/development/compilers/meta-environment/meta-build-env/default.nix +++ b/pkgs/development/compilers/meta-environment/meta-build-env/default.nix @@ -2,7 +2,7 @@ name = "meta-build-env-0.1"; src = fetchurl { url = http://www.meta-environment.org/releases/meta-build-env-0.1.tar.gz ; - md5 = "827b54ace4e2d3c8e7605ea149b34293"; + sha256 = "1imn1gaan4fv73v8w3k3lgyjzkcn7bdp69k6hlz0vqdg17ysd1x3"; }; meta = { diff --git a/pkgs/development/compilers/nim/default.nix b/pkgs/development/compilers/nim/default.nix index eed702f85128..0cebd40afdba 100644 --- a/pkgs/development/compilers/nim/default.nix +++ b/pkgs/development/compilers/nim/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, makeWrapper, gcc }: +{ stdenv, lib, fetchurl, makeWrapper, nodejs, openssl, pcre, readline, sqlite }: stdenv.mkDerivation rec { name = "nim-${version}"; @@ -9,24 +9,52 @@ stdenv.mkDerivation rec { sha256 = "0rsibhkc5n548bn9yyb9ycrdgaph5kq84sfxc9gabjs7pqirh6cy"; }; - buildInputs = [ makeWrapper ]; - - buildPhase = "sh build.sh"; - - installPhase = - '' - install -Dt "$out/bin" bin/nim - substituteInPlace install.sh --replace '$1/nim' "$out" - sh install.sh $out - wrapProgram $out/bin/nim \ - --suffix PATH : ${lib.makeBinPath [ gcc ]} - ''; - - meta = with stdenv.lib; - { description = "Statically typed, imperative programming language"; - homepage = http://nim-lang.org/; - license = licenses.mit; - maintainers = with maintainers; [ ehmry peterhoeg ]; - platforms = platforms.linux ++ platforms.darwin; # arbitrary - }; + doCheck = true; + + enableParallelBuilding = true; + + NIX_LDFLAGS = [ + "-lcrypto" + "-lpcre" + "-lreadline" + "-lsqlite3" + ]; + + # 1. nodejs is only needed for tests + # 2. we could create a separate derivation for the "written in c" version of nim + # used for bootstrapping, but koch insists on moving the nim compiler around + # as part of building it, so it cannot be read-only + + buildInputs = [ + makeWrapper nodejs + openssl pcre readline sqlite + ]; + + buildPhase = '' + sh build.sh + ./bin/nim c koch + ./koch boot -d:release \ + -d:useGnuReadline \ + ${lib.optionals (stdenv.isDarwin || stdenv.isLinux) "-d:nativeStacktrace"} + ./koch tools -d:release + ''; + + installPhase = '' + install -Dt $out/bin bin/* koch + ./koch install $out + mv $out/nim/bin/* $out/bin/ && rmdir $out/nim/bin + mv $out/nim/* $out/ && rmdir $out/nim + wrapProgram $out/bin/nim \ + --suffix PATH : ${lib.makeBinPath [ stdenv.cc ]} + ''; + + checkPhase = "./koch tests"; + + meta = with stdenv.lib; { + description = "Statically typed, imperative programming language"; + homepage = http://nim-lang.org/; + license = licenses.mit; + maintainers = with maintainers; [ ehmry peterhoeg ]; + platforms = with platforms; linux ++ darwin; # arbitrary + }; } diff --git a/pkgs/development/compilers/ocaml/4.04.nix b/pkgs/development/compilers/ocaml/4.04.nix new file mode 100644 index 000000000000..7e35c9e1aa80 --- /dev/null +++ b/pkgs/development/compilers/ocaml/4.04.nix @@ -0,0 +1,6 @@ +import ./generic.nix { + major_version = "4"; + minor_version = "04"; + patch_version = "0"; + sha256 = "1d2nk3kq4dyzz8dls45r13jprq5by3q8kshc8kvxzm8n4fnnvvb4"; +} diff --git a/pkgs/development/compilers/ocaml/generic.nix b/pkgs/development/compilers/ocaml/generic.nix index abded4b66900..17b3033c31df 100644 --- a/pkgs/development/compilers/ocaml/generic.nix +++ b/pkgs/development/compilers/ocaml/generic.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation (args // rec { buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt"; buildInputs = [ncurses] ++ optionals useX11 [ libX11 xproto ]; installTargets = "install" + optionalString useNativeCompilers " installopt"; - preConfigure = '' + preConfigure = optionalString (!stdenv.lib.versionAtLeast version "4.04") '' CAT=$(type -tp cat) sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang ''; @@ -56,7 +56,7 @@ stdenv.mkDerivation (args // rec { meta = with stdenv.lib; { homepage = http://caml.inria.fr/ocaml; - branch = "4.03"; + branch = versionNoPatch; license = with licenses; [ qpl /* compiler */ lgpl2 /* library */ diff --git a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix index e8d737e0082a..2f16acb51d9a 100644 --- a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix +++ b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix @@ -1,9 +1,9 @@ import ./jdk-linux-base.nix { productVersion = "8"; - patchVersion = "111"; + patchVersion = "121"; downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html; - sha256_i686 = "07wyyds52c3fp4ha1fnzp6mbxwq0rs3vx59167b57gkggg7qz3ls"; - sha256_x86_64 = "0x4937c3307v78wx1jf227b89cf5lsd5yarmbjrxs4pq6lidlzhq"; + sha256_i686 = "0k1xyg000qmd96c2r2m8l84ygn6dmjf1ih5yjzq1zry5d0aczmpp"; + sha256_x86_64 = "1g0hh9ccmsrdfa9493k31v2vd6yiymwd1nclgjh29wxfy41h5qwp"; jceName = "jce_policy-8.zip"; jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html; sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk"; diff --git a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix index fc2e6448fc3f..2f16acb51d9a 100644 --- a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix +++ b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix @@ -1,9 +1,9 @@ import ./jdk-linux-base.nix { productVersion = "8"; - patchVersion = "112"; + patchVersion = "121"; downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html; - sha256_i686 = "19b9vwb7bd17s9p04y47zzjkccazzmpy4dqx4rgxd79k1fw2yz0y"; - sha256_x86_64 = "19blsx81x5p2f6d9vig89z7cc8778cp6qdjy9ylsa2444vaxfyvp"; + sha256_i686 = "0k1xyg000qmd96c2r2m8l84ygn6dmjf1ih5yjzq1zry5d0aczmpp"; + sha256_x86_64 = "1g0hh9ccmsrdfa9493k31v2vd6yiymwd1nclgjh29wxfy41h5qwp"; jceName = "jce_policy-8.zip"; jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html; sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk"; diff --git a/pkgs/development/compilers/rust/patches/darwin-disable-fragile-tcp-tests.patch b/pkgs/development/compilers/rust/patches/darwin-disable-fragile-tcp-tests.patch index 5c51886b4d83..da550f0327d3 100644 --- a/pkgs/development/compilers/rust/patches/darwin-disable-fragile-tcp-tests.patch +++ b/pkgs/development/compilers/rust/patches/darwin-disable-fragile-tcp-tests.patch @@ -1,29 +1,37 @@ -From 0becb0b7cff0176279fc9f94c91299d788a43941 Mon Sep 17 00:00:00 2001 +From 1d8a91d5b09cb762fe890d04bfb61b9eefd0624a Mon Sep 17 00:00:00 2001 From: Moritz Ulrich <moritz@tarn-vedra.de> Date: Sun, 8 Jan 2017 10:28:17 +0100 Subject: [PATCH] Disable libstd::net::tcp::{ttl, timeouts} on Darwin --- - src/libstd/net/tcp.rs | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + src/libstd/net/tcp.rs | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs -index 0e7c5b0671..189c31b958 100644 +index 0e7c5b0671..d42fd26267 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs -@@ -1022,7 +1022,10 @@ mod tests { +@@ -551,6 +551,7 @@ mod tests { + }) + } + ++ #[cfg_attr(target_os = "macos", ignore)] + #[test] + fn write_close() { + each_ip(&mut |addr| { +@@ -1022,7 +1023,10 @@ mod tests { // FIXME: re-enabled bitrig/openbsd tests once their socket timeout code // no longer has rounding errors. - #[cfg_attr(any(target_os = "bitrig", target_os = "netbsd", target_os = "openbsd"), ignore)] -+ #[cfg_attr(any(target_os = "bitrig", -+ target_os = "netbsd", -+ target_os = "openbsd", -+ target_os = "macos"), ignore)] ++ #[cfg_attr(any(target_os = "bitrig", ++ target_os = "netbsd", ++ target_os = "openbsd", ++ target_os = "macos"), ignore)] #[test] fn timeouts() { let addr = next_test_ip4(); -@@ -1101,6 +1104,7 @@ mod tests { +@@ -1101,6 +1105,7 @@ mod tests { assert_eq!(false, t!(stream.nodelay())); } diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 04543f17ec98..056177fd265f 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -20,27 +20,17 @@ let else "${shortVersion}-g${builtins.substring 0 7 srcRev}"; - name = "rustc-${version}"; - procps = if stdenv.isDarwin then darwin.ps else args.procps; llvmShared = llvm.override { enableSharedLibraries = true; }; target = builtins.replaceStrings [" "] [","] (builtins.toString targets); - meta = with stdenv.lib; { - homepage = http://www.rust-lang.org/; - description = "A safe, concurrent, practical language"; - maintainers = with maintainers; [ madjar cstrahan wizeman globin havvy wkennington retrry ]; - license = [ licenses.mit licenses.asl20 ]; - platforms = platforms.linux ++ platforms.darwin; - }; in stdenv.mkDerivation { - inherit name; + name = "rustc-${version}"; inherit version; - inherit meta; __impureHostDeps = [ "/usr/lib/libedit.3.dylib" ]; @@ -52,6 +42,9 @@ stdenv.mkDerivation { # versions. RUSTC_BOOTSTRAP = "1"; + # Increase codegen units to introduce parallelism within the compiler. + RUSTFLAGS = "-Ccodegen-units=10"; + src = fetchgit { url = https://github.com/rust-lang/rust; rev = srcRev; @@ -130,13 +123,12 @@ stdenv.mkDerivation { buildInputs = [ ncurses ] ++ targetToolchains ++ optional (!forceBundledLLVM) llvmShared; - # https://github.com/rust-lang/rust/issues/30181 - # enableParallelBuilding = false; # missing files during linking, occasionally - outputs = [ "out" "doc" ]; setOutputFlags = false; + # Disable codegen units for the tests. preCheck = '' + export RUSTFLAGS= export TZDIR=${tzdata}/share/zoneinfo '' + # Ensure TMPDIR is set, and disable a test that removing the HOME @@ -147,7 +139,18 @@ stdenv.mkDerivation { sed -i '28s/home_dir().is_some()/true/' ./src/test/run-pass/env-home-dir.rs ''; - # Disable doCheck on Darwin to work around upstream issue doCheck = true; dontSetConfigureCross = true; + + # https://github.com/NixOS/nixpkgs/pull/21742#issuecomment-272305764 + # https://github.com/rust-lang/rust/issues/30181 + # enableParallelBuilding = false; + + meta = with stdenv.lib; { + homepage = http://www.rust-lang.org/; + description = "A safe, concurrent, practical language"; + maintainers = with maintainers; [ madjar cstrahan wizeman globin havvy wkennington retrry ]; + license = [ licenses.mit licenses.asl20 ]; + platforms = platforms.linux ++ platforms.darwin; + }; } diff --git a/pkgs/development/compilers/scala/2.10.nix b/pkgs/development/compilers/scala/2.10.nix index 26fd3850190b..946a9bedbf51 100644 --- a/pkgs/development/compilers/scala/2.10.nix +++ b/pkgs/development/compilers/scala/2.10.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchurl, makeWrapper, jre }: +{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }: stdenv.mkDerivation rec { - name = "scala-2.10.5"; + name = "scala-2.10.6"; src = fetchurl { url = "http://www.scala-lang.org/files/archive/${name}.tgz"; - sha256 = "1ckyz31gmf2pgdl51h1raa669mkl7sqfdl3vqkrmyc46w5ysz3ci"; + sha256 = "0rrdrndnxy8m76gppqh7yr68qfx0kxns5bwc69k4swz6va1zbbal"; }; propagatedBuildInputs = [ jre ] ; @@ -17,7 +17,11 @@ stdenv.mkDerivation rec { mv * $out for p in $(ls $out/bin/) ; do - wrapProgram $out/bin/$p --prefix PATH ":" ${jre}/bin ; + wrapProgram $out/bin/$p \ + --prefix PATH ":" ${coreutils}/bin \ + --prefix PATH ":" ${gnugrep}/bin \ + --prefix PATH ":" ${jre}/bin \ + --set JAVA_HOME ${jre} done ''; diff --git a/pkgs/development/compilers/scala/2.11.nix b/pkgs/development/compilers/scala/2.11.nix new file mode 100644 index 000000000000..394b2f9da094 --- /dev/null +++ b/pkgs/development/compilers/scala/2.11.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }: + +stdenv.mkDerivation rec { + name = "scala-2.11.8"; + + src = fetchurl { + url = "http://www.scala-lang.org/files/archive/${name}.tgz"; + sha256 = "1khs7673wca7gnxz2rxphv6v5k94jkpcarlqznsys9cpknhqdz47"; + }; + + propagatedBuildInputs = [ jre ] ; + buildInputs = [ makeWrapper ] ; + + installPhase = '' + mkdir -p $out + rm "bin/"*.bat + mv * $out + + for p in $(ls $out/bin/) ; do + wrapProgram $out/bin/$p \ + --prefix PATH ":" ${coreutils}/bin \ + --prefix PATH ":" ${gnugrep}/bin \ + --prefix PATH ":" ${jre}/bin \ + --set JAVA_HOME ${jre} + done + ''; + + meta = { + description = "General purpose programming language"; + longDescription = '' + Scala is a general purpose programming language designed to express + common programming patterns in a concise, elegant, and type-safe way. + It smoothly integrates features of object-oriented and functional + languages, enabling Java and other programmers to be more productive. + Code sizes are typically reduced by a factor of two to three when + compared to an equivalent Java application. + ''; + homepage = http://www.scala-lang.org/; + license = stdenv.lib.licenses.bsd3; + platforms = stdenv.lib.platforms.all; + branch = "2.11"; + }; +} diff --git a/pkgs/development/compilers/scala/default.nix b/pkgs/development/compilers/scala/default.nix index bc7da3581deb..8e1f8dd47220 100644 --- a/pkgs/development/compilers/scala/default.nix +++ b/pkgs/development/compilers/scala/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeWrapper, jre }: +{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }: stdenv.mkDerivation rec { name = "scala-2.12.1"; @@ -17,7 +17,11 @@ stdenv.mkDerivation rec { mv * $out for p in $(ls $out/bin/) ; do - wrapProgram $out/bin/$p --prefix PATH ":" ${jre}/bin ; + wrapProgram $out/bin/$p \ + --prefix PATH ":" ${coreutils}/bin \ + --prefix PATH ":" ${gnugrep}/bin \ + --prefix PATH ":" ${jre}/bin \ + --set JAVA_HOME ${jre} done ''; diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix index 0935891dcbd5..354c8f4e5f57 100644 --- a/pkgs/development/compilers/solc/default.nix +++ b/pkgs/development/compilers/solc/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchgit, boost, cmake, jsoncpp }: stdenv.mkDerivation rec { - version = "0.4.6"; + version = "0.4.8"; name = "solc-${version}"; # Cannot use `fetchFromGitHub' because of submodules src = fetchgit { url = "https://github.com/ethereum/solidity"; - rev = "2dabbdf06f414750ef0425c664f861aeb3e470b8"; - sha256 = "0q1dvizx60f7l97w8241wra7vpghimc9x7gzb18vn34sxv4bqy9g"; + rev = "60cc1668517f56ce6ca8225555472e7a27eab8b0"; + sha256 = "09mwah7c5ca1bgnqp5qgghsi6mbsi7p16z8yxm0aylsn2cjk23na"; }; patchPhase = '' diff --git a/pkgs/development/compilers/zulu/default.nix b/pkgs/development/compilers/zulu/default.nix new file mode 100644 index 000000000000..657f5274d000 --- /dev/null +++ b/pkgs/development/compilers/zulu/default.nix @@ -0,0 +1,67 @@ +{ stdenv, pkgs, fetchurl, unzip, makeWrapper, setJavaClassPath, swingSupport ? true }: + +with pkgs; + +let + version = "8.19.0.1"; + openjdk = "8.0.112"; + + sha256_linux = "1icb6in1197n44wk2cqnrxr7w0bd5abxxysfrhbg56jlb9nzmp4x"; + sha256_darwin = "0kxwh62a6kckc9l9jkgakf86lqkqazp3dwfwaxqc4cg5zczgbhmd"; + + platform = if stdenv.isDarwin then "macosx" else "linux"; + hash = if stdenv.isDarwin then sha256_darwin else sha256_linux; + extension = if stdenv.isDarwin then "zip" else "tar.gz"; +in stdenv.mkDerivation rec { + inherit version openjdk platform hash extension; + + name = "zulu-${version}"; + + src = fetchurl { + url = "https://cdn.azul.com/zulu/bin/zulu${version}-jdk${openjdk}-${platform}_x64.${extension}"; + sha256 = hash; + }; + + buildInputs = [ makeWrapper ] ++ stdenv.lib.optional stdenv.isDarwin [ unzip ]; + + installPhase = '' + mkdir -p $out + cp -r ./* "$out/" + + jrePath="$out/jre" + + rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/jli + rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/server + rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/xawt + rpath=$rpath''${rpath:+:}$jrePath/lib/amd64 + + # set all the dynamic linkers + find $out -type f -perm -0100 \ + -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + --set-rpath "$rpath" {} \; + + find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \; + + mkdir -p $out/nix-support + echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs + + # Set JAVA_HOME automatically. + cat <<EOF >> $out/nix-support/setup-hook + if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi + EOF + ''; + + libraries = [ stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xorg.libXxf86vm alsaLib fontconfig freetype gnome2.pango gnome2.gtk cairo gdk_pixbuf atk ] + ++ (if swingSupport then [ xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt xorg.libXrender stdenv.cc.cc ] else [ ]); + + rpath = stdenv.lib.strings.makeLibraryPath libraries; + + meta = with stdenv.lib; { + homepage = https://www.azul.com/products/zulu/; + license = licenses.gpl2; + description = "Certified builds of OpenJDK"; + longDescription = "Certified builds of OpenJDK that can be deployed across multiple operating systems, containers, hypervisors and Cloud platforms"; + maintainers = with maintainers; [ nequissimus ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; + }; +} |