diff options
Diffstat (limited to 'pkgs/development/compilers')
50 files changed, 530 insertions, 1356 deletions
diff --git a/pkgs/development/compilers/binaryen/default.nix b/pkgs/development/compilers/binaryen/default.nix index 2c2869f76e72..fc75fe92c730 100644 --- a/pkgs/development/compilers/binaryen/default.nix +++ b/pkgs/development/compilers/binaryen/default.nix @@ -1,11 +1,11 @@ { stdenv, cmake, fetchFromGitHub, emscriptenRev ? null }: let - defaultVersion = "44"; + defaultVersion = "45"; # Map from git revs to SHA256 hashes sha256s = { - "version_44" = "0zsqppc05fm62807w6vyccxkk2y2gar7kxbxxixq8zz3xsp6w84p"; + "version_45" = "1wgzfzjjzkiaz0rf2lnwrcvlcsjvjhyvbyh58jxhqq43vi34zyjc"; "1.37.36" = "1wgzfzjjzkiaz0rf2lnwrcvlcsjvjhyvbyh58jxhqq43vi34zyjc"; }; in diff --git a/pkgs/development/compilers/closure/default.nix b/pkgs/development/compilers/closure/default.nix index 9472384020bc..de3126371bfa 100644 --- a/pkgs/development/compilers/closure/default.nix +++ b/pkgs/development/compilers/closure/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "closure-compiler-${version}"; - version = "20180204"; + version = "20180319"; src = fetchurl { url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz"; - sha256 = "1nh4yznabwpp9k6flk9562w87d6sxk1fwwpk4d3knwy25iyn3mwq"; + sha256 = "181cskxamq9vkrmb2c78v6hpknrzzp49vkzp53r9pisf5j0p7220"; }; sourceRoot = "."; diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix index 4520363a53b2..8ed34cf9d1e0 100644 --- a/pkgs/development/compilers/elm/default.nix +++ b/pkgs/development/compilers/elm/default.nix @@ -74,23 +74,26 @@ let elm-format = self.callPackage ./packages/elm-format.nix { }; elm-interface-to-json = self.callPackage ./packages/elm-interface-to-json.nix { aeson-pretty = self.aeson-pretty_0_7_2; + either = hlib.overrideCabal self.either (drv :{ + jailbreak = true; + version = "4.4.1.1"; + sha256 = "1lrlwqqnm6ibfcydlv5qvvssw7bm0c6yypy0rayjzv1znq7wp1xh"; + libraryHaskellDepends = drv.libraryHaskellDepends or [] ++ [ + self.exceptions self.free self.mmorph self.monad-control + self.MonadRandom self.profunctors self.transformers + self.transformers-base + ]; + }); }; }; in elmPkgs // { inherit elmPkgs; elmVersion = elmRelease.version; - # needed for elm-package - http-client = hlib.overrideCabal super.http-client (drv: { - version = "0.4.31.2"; - sha256 = "12yq2l6bvmxg5w6cw5ravdh39g8smwn1j44mv36pfmkhm5402h8n"; - }); - http-client-tls = hlib.overrideCabal super.http-client-tls (drv: { - version = "0.2.4.1"; - sha256 = "18wbca7jg15p0ds3339f435nqv2ng0fqc4bylicjzlsww625ij4d"; - }); # https://github.com/elm-lang/elm-compiler/issues/1566 indents = hlib.overrideCabal super.indents (drv: { version = "0.3.3"; + #test dep tasty has a version mismatch + doCheck = false; sha256 = "16lz21bp9j14xilnq8yym22p3saxvc9fsgfcf5awn2a6i6n527xn"; libraryHaskellDepends = drv.libraryHaskellDepends ++ [super.concatenative]; }); diff --git a/pkgs/development/compilers/elm/packages/elm-package.nix b/pkgs/development/compilers/elm/packages/elm-package.nix index 4a60b3dfb387..49eddb58a142 100644 --- a/pkgs/development/compilers/elm/packages/elm-package.nix +++ b/pkgs/development/compilers/elm/packages/elm-package.nix @@ -1,6 +1,6 @@ { mkDerivation, aeson, aeson-pretty_0_7_2, ansi-wl-pprint, base, binary , bytestring, containers, directory, edit-distance, elm-compiler -, fetchgit, filepath, HTTP, http-client, http-client-tls +, fetchgit, fetchurl, filepath, HTTP, http-client, http-client-tls , http-types, mtl, network, optparse-applicative, parallel-io , pretty, stdenv, text, time, unordered-containers, vector , zip-archive @@ -13,6 +13,10 @@ mkDerivation { sha256 = "19krnkjvfk02gmmic5h5i1i0lw7s30927bnd5g57cj8nqbigysv7"; rev = "8bd150314bacab5b6fc451927aa01deec2276fbf"; }; + patches = fetchurl { + url = https://github.com/jerith666/elm-package/commit/40bab60c2fbff70812cc24cdd97f5e09db3844ad.patch; + sha256 = "0j6pi6cv3h9s6vz68bh0c73fysvk83yhhk56kgshvnrmnpcb3jib"; + }; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ diff --git a/pkgs/development/compilers/gambit/bootstrap.nix b/pkgs/development/compilers/gambit/bootstrap.nix index 7376aec27501..05e804a1f740 100644 --- a/pkgs/development/compilers/gambit/bootstrap.nix +++ b/pkgs/development/compilers/gambit/bootstrap.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { description = "Optimizing Scheme to C compiler, bootstrap step"; homepage = "http://gambitscheme.org"; license = stdenv.lib.licenses.lgpl2; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ]; }; } diff --git a/pkgs/development/compilers/gambit/build.nix b/pkgs/development/compilers/gambit/build.nix new file mode 100644 index 000000000000..202e55254222 --- /dev/null +++ b/pkgs/development/compilers/gambit/build.nix @@ -0,0 +1,70 @@ +{ stdenv, git, openssl, autoconf, pkgs, makeStaticLibraries, version, git-version, SRC }: + +stdenv.mkDerivation rec { + name = "gambit-${version}"; + src = SRC; + + bootstrap = import ./bootstrap.nix ( pkgs ); + + # Use makeStaticLibraries to enable creation of statically linked binaries + buildInputs = [ git autoconf bootstrap openssl (makeStaticLibraries openssl)]; + + configurePhase = '' + options=( + --prefix=$out + --enable-single-host + --enable-c-opt=-O2 + --enable-gcc-opts + --enable-shared + --enable-absolute-shared-libs # Yes, NixOS will want an absolute path, and fix it. + --enable-poll + --enable-openssl + --enable-default-runtime-options="f8,-8,t8" # Default to UTF-8 for source and all I/O + #--enable-debug # Nope: enables plenty of good stuff, but also the costly console.log + + #--enable-multiple-versions # Nope, NixOS already does version multiplexing + #--enable-guide + #--enable-track-scheme + #--enable-high-res-timing + #--enable-max-processors=4 + #--enable-multiple-vms + #--enable-dynamic-tls + #--enable-multiple-vms + #--enable-multiple-threaded-vms ## when SMP branch is merged in + #--enable-thread-system=posix ## default when --enable-multiple-vms is on. + #--enable-profile + #--enable-coverage + #--enable-inline-jumps + #--enable-char-size=1" ; default is 4 + ) + ./configure ''${options[@]} + ''; + + buildPhase = '' + # Make bootstrap compiler, from release bootstrap + mkdir -p boot && + cp -rp ${bootstrap}/. boot/. && + chmod -R u+w boot && + cd boot && + cp ../gsc/makefile.in ../gsc/*.scm gsc && # */ + ./configure && + for i in lib gsi gsc ; do (cd $i ; make ) ; done && + cd .. && + cp boot/gsc/gsc gsc-boot && + + # Now use the bootstrap compiler to build the real thing! + make -j2 from-scratch + ''; + + doCheck = true; + + meta = { + description = "Optimizing Scheme to C compiler"; + homepage = "http://gambitscheme.org"; + license = stdenv.lib.licenses.lgpl2; + # NB regarding platforms: only actually tested on Linux, *should* work everywhere, + # but *might* need adaptation e.g. on macOS. + platforms = stdenv.lib.platforms.unix; + maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ]; + }; +} diff --git a/pkgs/development/compilers/gambit/default.nix b/pkgs/development/compilers/gambit/default.nix index 95e8dba762a2..0996d0c3078a 100644 --- a/pkgs/development/compilers/gambit/default.nix +++ b/pkgs/development/compilers/gambit/default.nix @@ -1,75 +1,13 @@ -{ stdenv, fetchurl, fetchgit, git, openssl, autoconf, pkgs, makeStaticLibraries }: +{ callPackage, fetchgit }: -# TODO: distinct packages for gambit-release and gambit-devel - -stdenv.mkDerivation rec { - name = "gambit-${version}"; +callPackage ./build.nix { version = "4.8.9"; - bootstrap = import ./bootstrap.nix ( pkgs ); + # TODO: for next version, prefer the unpatched tarball for the stable/default gambit. + git-version = "4.8.9-8-g793679bd"; - src = fetchgit { + SRC = fetchgit { url = "https://github.com/feeley/gambit.git"; rev = "dd54a71dfc0bd09813592f1645d755867a02195d"; sha256 = "120kg73k39gshrwas8a3xcrxgnq1c7ww92wgy4d3mmrwy3j9nzzc"; }; - - # Use makeStaticLibraries to enable creation of statically linked binaries - buildInputs = [ git autoconf bootstrap openssl (makeStaticLibraries openssl)]; - - configurePhase = '' - options=( - --prefix=$out - --enable-single-host - --enable-c-opt=-O2 - --enable-gcc-opts - --enable-shared - --enable-absolute-shared-libs # Yes, NixOS will want an absolute path, and fix it. - --enable-poll - --enable-openssl - --enable-default-runtime-options="f8,-8,t8" # Default to UTF-8 for source and all I/O - #--enable-debug # Nope: enables plenty of good stuff, but also the costly console.log - - #--enable-multiple-versions # Nope, NixOS already does version multiplexing - #--enable-guide - #--enable-track-scheme - #--enable-high-res-timing - #--enable-max-processors=4 - #--enable-multiple-vms - #--enable-dynamic-tls - #--enable-multiple-vms - #--enable-multiple-threaded-vms ## when SMP branch is merged in - #--enable-thread-system=posix ## default when --enable-multiple-vms is on. - #--enable-profile - #--enable-coverage - #--enable-inline-jumps - #--enable-char-size=1" ; default is 4 - ) - ./configure ''${options[@]} - ''; - - buildPhase = '' - # Make bootstrap compiler, from release bootstrap - mkdir -p boot && - cp -rp ${bootstrap}/. boot/. && - chmod -R u+w boot && - cd boot && - cp ../gsc/makefile.in ../gsc/*.scm gsc && # */ - ./configure && - for i in lib gsi gsc ; do (cd $i ; make ) ; done && - cd .. && - cp boot/gsc/gsc gsc-boot && - - # Now use the bootstrap compiler to build the real thing! - make -j2 from-scratch - ''; - - doCheck = true; - - meta = { - description = "Optimizing Scheme to C compiler"; - homepage = "http://gambitscheme.org"; - license = stdenv.lib.licenses.lgpl2; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin fare ]; - }; } diff --git a/pkgs/development/compilers/gambit/unstable.nix b/pkgs/development/compilers/gambit/unstable.nix new file mode 100644 index 000000000000..f98fd5ca935a --- /dev/null +++ b/pkgs/development/compilers/gambit/unstable.nix @@ -0,0 +1,11 @@ +{ callPackage, fetchgit }: + +callPackage ./build.nix { + version = "unstable-2018-03-26"; + git-version = "4.8.9-8-g793679bd"; + SRC = fetchgit { + url = "https://github.com/feeley/gambit.git"; + rev = "793679bd57eb6275cb06e6570b05f4a78df61bf9"; + sha256 = "0bippvmrc8vcaa6ka3mhzfgkagb6a1616g7nxk0i0wapxai5cngj"; + }; +} diff --git a/pkgs/development/compilers/gerbil/build.nix b/pkgs/development/compilers/gerbil/build.nix new file mode 100644 index 000000000000..5609de15d4cb --- /dev/null +++ b/pkgs/development/compilers/gerbil/build.nix @@ -0,0 +1,88 @@ +{ stdenv, lib, makeStaticLibraries, + coreutils, rsync, bash, + openssl, zlib, sqlite, libxml2, libyaml, mysql, lmdb, leveldb, postgresql, + version, git-version, GAMBIT, SRC }: + +# TODO: distinct packages for gerbil-release and gerbil-devel +# TODO: make static compilation work + +stdenv.mkDerivation rec { + name = "gerbil-${version}"; + src = SRC; + + # Use makeStaticLibraries to enable creation of statically linked binaries + buildInputs_libraries = [ openssl zlib sqlite libxml2 libyaml mysql.connector-c lmdb leveldb postgresql ]; + buildInputs_staticLibraries = map makeStaticLibraries buildInputs_libraries; + + buildInputs = [ GAMBIT coreutils rsync bash ] + ++ buildInputs_libraries ++ buildInputs_staticLibraries; + + NIX_CFLAGS_COMPILE = [ "-I${mysql.connector-c}/include/mysql" "-L${mysql.connector-c}/lib/mysql" ]; + + postPatch = '' + echo '(define (gerbil-version-string) "v${git-version}")' > src/gerbil/runtime/gx-version.scm + + patchShebangs . + + find . -type f -executable -print0 | while IFS= read -r -d ''$'\0' f; do + substituteInPlace "$f" --replace '#!/usr/bin/env' '#!${coreutils}/bin/env' + done + + cat > etc/gerbil_static_libraries.sh <<EOF +#OPENSSL_LIBCRYPTO=${makeStaticLibraries openssl}/lib/libcrypto.a # MISSING! +#OPENSSL_LIBSSL=${makeStaticLibraries openssl}/lib/libssl.a # MISSING! +ZLIB=${makeStaticLibraries zlib}/lib/libz.a +# SQLITE=${makeStaticLibraries sqlite}/lib/sqlite.a # MISSING! +# LIBXML2=${makeStaticLibraries libxml2}/lib/libxml2.a # MISSING! +# YAML=${makeStaticLibraries libyaml}/lib/libyaml.a # MISSING! +MYSQL=${makeStaticLibraries mysql.connector-c}/lib/mariadb/libmariadb.a +# LMDB=${makeStaticLibraries lmdb}/lib/mysql/libmysqlclient_r.a # MISSING! +LEVELDB=${makeStaticLibraries lmdb}/lib/libleveldb.a +EOF + ''; + + buildPhase = '' + runHook preBuild + + # Enable all optional libraries + substituteInPlace "src/std/build-features.ss" --replace '#f' '#t' + + # gxprof testing uses $HOME/.cache/gerbil/gxc + export HOME=$$PWD + + # Build, replacing make by build.sh + ( cd src && sh build.sh ) + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/ + cp -fa bin lib etc doc $out/ + + cat > $out/bin/gxi <<EOF +#!${bash}/bin/bash -e +export GERBIL_HOME=$out +case "\$1" in -:*) GSIOPTIONS=\$1 ; shift ;; esac +if [[ \$# = 0 ]] ; then + exec ${GAMBIT}/bin/gsi \$GSIOPTIONS \$GERBIL_HOME/lib/gxi-init \$GERBIL_HOME/lib/gxi-interactive - ; +else + exec ${GAMBIT}/bin/gsi \$GSIOPTIONS \$GERBIL_HOME/lib/gxi-init "\$@" +fi +EOF + runHook postInstall + ''; + + dontStrip = true; + + meta = { + description = "Gerbil Scheme"; + homepage = "https://github.com/vyzo/gerbil"; + license = stdenv.lib.licenses.lgpl2; + # NB regarding platforms: only actually tested on Linux, *should* work everywhere, + # but *might* need adaptation e.g. on macOS. Please report success and/or failure to fare. + platforms = stdenv.lib.platforms.unix; + maintainers = with stdenv.lib.maintainers; [ fare ]; + }; +} diff --git a/pkgs/development/compilers/gerbil/default.nix b/pkgs/development/compilers/gerbil/default.nix index c1a411120d03..eaab0e71d3bd 100644 --- a/pkgs/development/compilers/gerbil/default.nix +++ b/pkgs/development/compilers/gerbil/default.nix @@ -1,91 +1,11 @@ -{ stdenv, lib, fetchurl, fetchgit, makeStaticLibraries, gambit, - coreutils, rsync, bash, - openssl, zlib, sqlite, libxml2, libyaml, mysql, lmdb, leveldb, postgresql }: - -# TODO: distinct packages for gerbil-release and gerbil-devel -# TODO: make static compilation work - -stdenv.mkDerivation rec { - name = "gerbil-${version}"; +{ callPackage, fetchurl, gambit }: +callPackage ./build.nix { version = "0.12-RELEASE"; - src = fetchgit { - url = "https://github.com/vyzo/gerbil.git"; - rev = "5618892d7939e1cb4ef5247912e0bc1ec99f6b52"; - sha256 = "0b2valahf5k81r4sp6y12d44fb286p92s7k6dphij0kmvg0dp818"; - }; - - # Use makeStaticLibraries to enable creation of statically linked binaries - buildInputs_libraries = [ openssl zlib sqlite libxml2 libyaml mysql.connector-c lmdb leveldb postgresql ]; - buildInputs_staticLibraries = map makeStaticLibraries buildInputs_libraries; - - buildInputs = [ gambit coreutils rsync bash ] - ++ buildInputs_libraries ++ buildInputs_staticLibraries; - - NIX_CFLAGS_COMPILE = [ "-I${mysql.connector-c}/include/mysql" "-L${mysql.connector-c}/lib/mysql" ]; - - postPatch = '' - echo '(define (gerbil-version-string) "v${version}")' > src/gerbil/runtime/gx-version.scm - - patchShebangs . - - find . -type f -executable -print0 | while IFS= read -r -d ''$'\0' f; do - substituteInPlace "$f" --replace '#!/usr/bin/env' '#!${coreutils}/bin/env' - done - - cat > etc/gerbil_static_libraries.sh <<EOF -#OPENSSL_LIBCRYPTO=${makeStaticLibraries openssl}/lib/libcrypto.a # MISSING! -#OPENSSL_LIBSSL=${makeStaticLibraries openssl}/lib/libssl.a # MISSING! -ZLIB=${makeStaticLibraries zlib}/lib/libz.a -# SQLITE=${makeStaticLibraries sqlite}/lib/sqlite.a # MISSING! -# LIBXML2=${makeStaticLibraries libxml2}/lib/libxml2.a # MISSING! -# YAML=${makeStaticLibraries libyaml}/lib/libyaml.a # MISSING! -MYSQL=${makeStaticLibraries mysql.connector-c}/lib/mariadb/libmariadb.a -# LMDB=${makeStaticLibraries lmdb}/lib/mysql/libmysqlclient_r.a # MISSING! -LEVELDB=${makeStaticLibraries lmdb}/lib/libleveldb.a -EOF - ''; - - buildPhase = '' - runHook preBuild - - # Enable all optional libraries - substituteInPlace "src/std/build-features.ss" --replace '#f' '#t' - - # gxprof testing uses $HOME/.cache/gerbil/gxc - export HOME=$$PWD - - # Build, replacing make by build.sh - ( cd src && sh build.sh ) - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - mkdir -p $out/ - cp -fa bin lib etc doc $out/ - - cat > $out/bin/gxi <<EOF -#!${bash}/bin/bash -e -export GERBIL_HOME=$out -case "\$1" in -:*) GSIOPTIONS=\$1 ; shift ;; esac -if [[ \$# = 0 ]] ; then - exec ${gambit}/bin/gsi \$GSIOPTIONS \$GERBIL_HOME/lib/gxi-init \$GERBIL_HOME/lib/gxi-interactive - ; -else - exec ${gambit}/bin/gsi \$GSIOPTIONS \$GERBIL_HOME/lib/gxi-init "\$@" -fi -EOF - runHook postInstall - ''; - - dontStrip = true; - - meta = { - description = "Gerbil Scheme"; - homepage = "https://github.com/vyzo/gerbil"; - license = stdenv.lib.licenses.lgpl2; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ fare ]; + git-version = "0.12"; + GAMBIT = gambit; + SRC = fetchurl { + url = "https://github.com/vyzo/gerbil/archive/v0.12.tar.gz"; + sha256 = "0nigr3mgrzai57q2jqac8f39zj8rcmic3277ynyzlgm8hhps71pq"; }; } diff --git a/pkgs/development/compilers/gerbil/unstable.nix b/pkgs/development/compilers/gerbil/unstable.nix new file mode 100644 index 000000000000..ec36f42d86e6 --- /dev/null +++ b/pkgs/development/compilers/gerbil/unstable.nix @@ -0,0 +1,12 @@ +{ callPackage, fetchgit, gambit-unstable }: + +callPackage ./build.nix { + version = "unstable-2018-04-03"; + git-version = "0.13-DEV-357-ge61318dc"; + GAMBIT = gambit-unstable; + SRC = fetchgit { + url = "https://github.com/vyzo/gerbil.git"; + rev = "e61318dcaa3a9c843e2cf259e67851f240e4beda"; + sha256 = "1xd7yxiramifdxgp6b3s24z6nkkmy5h4a6pkchvy4w358qv1vqin"; + }; +} diff --git a/pkgs/development/compilers/ghc/8.4.2.nix b/pkgs/development/compilers/ghc/8.4.2.nix new file mode 100644 index 000000000000..e381c411925b --- /dev/null +++ b/pkgs/development/compilers/ghc/8.4.2.nix @@ -0,0 +1,193 @@ +{ stdenv, targetPackages +, buildPlatform, hostPlatform, targetPlatform + +# build-tools +, bootPkgs, alex, happy +, autoconf, automake, coreutils, fetchgit, fetchpatch, perl, python3 + +, libffi, libiconv ? null, ncurses + +, useLLVM ? !targetPlatform.isx86 +, # LLVM is conceptually a run-time-only depedendency, but for + # non-x86, we need LLVM to bootstrap later stages, so it becomes a + # build-time dependency too. + buildLlvmPackages, llvmPackages + +, # If enabled, GHC will be built with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. + enableIntegerSimple ? false, gmp ? null, m4 + +, # If enabled, use -fPIC when compiling static libs. + enableRelocatedStaticLibs ? targetPlatform != hostPlatform + +, # Whether to build dynamic libs for the standard library (on the target + # platform). Static libs are always built. + enableShared ? true + +, version ? "8.4.2" +}: + +assert !enableIntegerSimple -> gmp != null; + +let + inherit (bootPkgs) ghc; + + # TODO(@Ericson2314) Make unconditional + targetPrefix = stdenv.lib.optionalString + (targetPlatform != hostPlatform) + "${targetPlatform.config}-"; + + buildMK = '' + DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"} + '' + stdenv.lib.optionalString enableIntegerSimple '' + INTEGER_LIBRARY = integer-simple + '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) '' + BuildFlavour = perf-cross + Stage1Only = YES + HADDOCK_DOCS = NO + BUILD_SPHINX_HTML = NO + BUILD_SPHINX_PDF = NO + '' + stdenv.lib.optionalString enableRelocatedStaticLibs '' + GhcLibHcOpts += -fPIC + GhcRtsHcOpts += -fPIC + ''; + + # Splicer will pull out correct variations + libDeps = platform: [ ncurses ] + ++ stdenv.lib.optional (!enableIntegerSimple) gmp + ++ stdenv.lib.optional (platform.libc != "glibc") libiconv; + + toolsForTarget = + if hostPlatform == buildPlatform then + [ targetPackages.stdenv.cc ] ++ stdenv.lib.optional useLLVM llvmPackages.llvm + else assert targetPlatform == hostPlatform; # build != host == target + [ stdenv.cc ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm; + + targetCC = builtins.head toolsForTarget; + +in +stdenv.mkDerivation rec { + inherit version; + inherit (src) rev; + name = "${targetPrefix}ghc-${version}"; + + src = fetchgit { + url = "git://git.haskell.org/ghc.git"; + rev = "6d7eecff7948ad77854f834f55b4d4f942276ad3"; + sha256 = "0aqy5x0b6qxhyvxw1q9pssf1xvhbyviglqkjrx4gvhbr3nax3wxp"; + }; + + enableParallelBuilding = true; + + outputs = [ "out" "doc" ]; + + postPatch = "patchShebangs ."; + + # GHC is a bit confused on its cross terminology. + preConfigure = '' + for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do + export "''${env#TARGET_}=''${!env}" + done + # GHC is a bit confused on its cross terminology, as these would normally be + # the *host* tools. + export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" + export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx" + # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 + export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isArm ".gold"}" + export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" + export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar" + export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm" + export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" + export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" + export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" + + echo -n "${buildMK}" > mk/build.mk + echo ${version} >VERSION + echo ${src.rev} >GIT_COMMIT_ID + ./boot + sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure + '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' + export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}" + '' + stdenv.lib.optionalString stdenv.isDarwin '' + export NIX_LDFLAGS+=" -no_dtrace_dof" + ''; + + # TODO(@Ericson2314): Always pass "--target" and always prefix. + configurePlatforms = [ "build" "host" ] + ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; + # `--with` flags for libraries needed for RTS linker + configureFlags = [ + "--datadir=$doc/share/doc/ghc" + "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" + ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [ + "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" + ] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [ + "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib" + ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [ + "--enable-bootstrap-with-devel-snapshot" + ] ++ stdenv.lib.optionals (targetPlatform.isArm) [ + "CFLAGS=-fuse-ld=gold" + "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold" + "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold" + ] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [ + # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ + "--disable-large-address-space" + ]; + + # Hack to make sure we never to the relaxation `$PATH` and hooks support for + # compatability. This will be replaced with something clearer in a future + # masss-rebuild. + crossConfig = true; + + nativeBuildInputs = [ ghc perl autoconf automake m4 happy alex python3 ]; + + # For building runtime libs + depsBuildTarget = toolsForTarget; + + buildInputs = libDeps hostPlatform; + + propagatedBuildInputs = [ targetPackages.stdenv.cc ] + ++ stdenv.lib.optional useLLVM llvmPackages.llvm; + + depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform); + depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform); + + # required, because otherwise all symbols from HSffi.o are stripped, and + # that in turn causes GHCi to abort + stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols"; + + checkTarget = "test"; + + # zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't + # treat that as a unary `{x,y,z,..}` repetition. + postInstall = '' + paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"} + + # Install the bash completion file. + install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc + + # Patch scripts to include "readelf" and "cat" in $PATH. + for i in "$out/bin/"*; do + test ! -h $i || continue + egrep --quiet '^#!' <(head -n 1 $i) || continue + sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i + done + ''; + + passthru = { + inherit bootPkgs targetPrefix; + + inherit llvmPackages; + + # Our Cabal compiler name + haskellCompilerName = "ghc-8.4.2"; + }; + + meta = { + homepage = http://haskell.org/ghc; + description = "The Glasgow Haskell Compiler"; + maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ]; + inherit (ghc.meta) license platforms; + }; + +} diff --git a/pkgs/development/compilers/ghcjs/base.nix b/pkgs/development/compilers/ghcjs/base.nix index 3aac2d70e137..07662d32d258 100644 --- a/pkgs/development/compilers/ghcjs/base.nix +++ b/pkgs/development/compilers/ghcjs/base.nix @@ -189,7 +189,7 @@ in mkDerivation (rec { description = "A Haskell to JavaScript compiler that uses the GHC API"; license = stdenv.lib.licenses.bsd3; platforms = ghc.meta.platforms; - maintainers = with stdenv.lib.maintainers; [ jwiegley cstrahan dmjio ]; + maintainers = with stdenv.lib.maintainers; [ jwiegley cstrahan dmjio elvishjerricco ]; hydraPlatforms = if broken then [] else ghc.meta.platforms; inherit broken; }) diff --git a/pkgs/development/compilers/ghcjs/default.nix b/pkgs/development/compilers/ghcjs/default.nix index b5a7a7f7cfc2..7f3cc9440015 100644 --- a/pkgs/development/compilers/ghcjs/default.nix +++ b/pkgs/development/compilers/ghcjs/default.nix @@ -2,5 +2,4 @@ bootPkgs.callPackage ./base.nix { inherit bootPkgs cabal-install; - broken = true; # https://hydra.nixos.org/build/70552553 } diff --git a/pkgs/development/compilers/glslang/default.nix b/pkgs/development/compilers/glslang/default.nix index 151f42a7aa7b..ca1e2f54df93 100644 --- a/pkgs/development/compilers/glslang/default.nix +++ b/pkgs/development/compilers/glslang/default.nix @@ -1,21 +1,35 @@ -{ stdenv, fetchFromGitHub, cmake, bison }: +{ stdenv, fetchFromGitHub, cmake, bison, spirv-tools, jq }: stdenv.mkDerivation rec { name = "glslang-git-${version}"; - version = "2017-08-31"; + version = "2018-02-05"; # `vulkan-loader` requires a specific version of `glslang` as specified in # `<vulkan-loader-repo>/external_revisions/glslang_revision`. src = fetchFromGitHub { owner = "KhronosGroup"; repo = "glslang"; - rev = "3a21c880500eac21cdf79bef5b80f970a55ac6af"; - sha256 = "1i15m17r0acmzjrkybris2rgw15il05a4w5h7vhhsiyngcvajcyn"; + rev = "2651ccaec8"; + sha256 = "0x5x5i07n9g809rzf5jgw70mmwck31ishdmxnmi0wxx737jjqwaq"; }; - buildInputs = [ cmake bison ]; + buildInputs = [ cmake bison jq ] ++ spirv-tools.buildInputs; enableParallelBuilding = true; + patchPhase = '' + cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools + ln -s "${spirv-tools.headers}" External/spirv-tools/external/spirv-headers + ''; + + preConfigure = '' + HEADERS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools/external/spirv-headers"))[0].commit') + TOOLS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools"))[0].commit') + if [ "$HEADERS_COMMIT" != "${spirv-tools.headers.rev}" ] || [ "$TOOLS_COMMIT" != "${spirv-tools.src.rev}" ]; then + echo "ERROR: spirv-tools commits do not match expected versions"; + exit 1; + fi + ''; + meta = with stdenv.lib; { inherit (src.meta) homepage; description = "Khronos reference front-end for GLSL and ESSL"; diff --git a/pkgs/development/compilers/go/1.10.nix b/pkgs/development/compilers/go/1.10.nix index 145f6a17978d..173d7a32fdc6 100644 --- a/pkgs/development/compilers/go/1.10.nix +++ b/pkgs/development/compilers/go/1.10.nix @@ -25,13 +25,13 @@ in stdenv.mkDerivation rec { name = "go-${version}"; - version = "1.10"; + version = "1.10.1"; src = fetchFromGitHub { owner = "golang"; repo = "go"; rev = "go${version}"; - sha256 = "1dzs1mz3zxgg1qyi2lrlxdz1lsvazxvmj9cb69pgqnwjlh3jpw0l"; + sha256 = "1wqwy52ibb343a4v7b9q26xa6r5jk4khfxd90wbpcayws8cxly8m"; }; # perl is used for testing go vet diff --git a/pkgs/development/compilers/go/1.9.nix b/pkgs/development/compilers/go/1.9.nix index c866212170c4..631e61c23053 100644 --- a/pkgs/development/compilers/go/1.9.nix +++ b/pkgs/development/compilers/go/1.9.nix @@ -25,13 +25,13 @@ in stdenv.mkDerivation rec { name = "go-${version}"; - version = "1.9.4"; + version = "1.9.5"; src = fetchFromGitHub { owner = "golang"; repo = "go"; rev = "go${version}"; - sha256 = "15d9lfiy1cjfz6nqnig5884ykqckx58cynd1bva1xna7bwcwwp2r"; + sha256 = "15dx1b71xv7b265gqk9nv02pirggpw7d83apikhrza2qkj64ydd0"; }; # perl is used for testing go vet diff --git a/pkgs/development/compilers/icedtea-web/default.nix b/pkgs/development/compilers/icedtea-web/default.nix index fb03d98dbdc0..9390cbde6377 100644 --- a/pkgs/development/compilers/icedtea-web/default.nix +++ b/pkgs/development/compilers/icedtea-web/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { name = "icedtea-web-${version}"; - version = "1.6.2"; + version = "1.7.1"; src = fetchurl { url = "http://icedtea.wildebeest.org/download/source/${name}.tar.gz"; - sha256 = "004kwrngyxxlrlzby4vzxjr0xcyngcdc9dfgnvi61ffnjr006ryf"; + sha256 = "1b9z0i9b1dsc2qpfdzbn2fi4vi3idrhm7ig45g1ny40ymvxcwwn9"; }; nativeBuildInputs = [ pkgconfig bc perl ]; diff --git a/pkgs/development/compilers/jetbrains-jdk/default.nix b/pkgs/development/compilers/jetbrains-jdk/default.nix index 604474e01fe9..5ffb7b92b26a 100644 --- a/pkgs/development/compilers/jetbrains-jdk/default.nix +++ b/pkgs/development/compilers/jetbrains-jdk/default.nix @@ -7,13 +7,13 @@ let drv = stdenv.mkDerivation rec { pname = "jetbrainsjdk"; - version = "152b1036.1"; + version = "152b1136.20"; name = pname + "-" + version; src = if stdenv.system == "x86_64-linux" then fetchurl { url = "https://bintray.com/jetbrains/intellij-jdk/download_file?file_path=jbsdk8u${version}_linux_x64.tar.gz"; - sha256 = "1768f02i3dxdbxn8n29d522h8v0mkgnhpb8ixzq5p54vwjmfl6md"; + sha256 = "0sqr8f3z062kwcxh3dxnan45ldas438blbc69z0pypbhc8c2sk2b"; } else throw "unsupported system: ${stdenv.system}"; diff --git a/pkgs/development/compilers/julia/0.6.nix b/pkgs/development/compilers/julia/0.6.nix index 36bbb7d817f7..6fad8e5259c5 100644 --- a/pkgs/development/compilers/julia/0.6.nix +++ b/pkgs/development/compilers/julia/0.6.nix @@ -172,10 +172,14 @@ stdenv.mkDerivation rec { ''; postInstall = '' - for prog in "$out/bin/julia" "$out/bin/julia-debug"; do - wrapProgram "$prog" \ - --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH:$out/lib/julia" \ - --prefix PATH : "${stdenv.lib.makeBinPath [ curl ]}" + # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia, + # as using a wrapper with LD_LIBRARY_PATH causes segmentation + # faults when program returns an error: + # $ julia -e 'throw(Error())' + find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do + if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then + ln -sv $lib $out/lib/julia/$(basename $lib) + fi done ''; diff --git a/pkgs/development/compilers/llvm/3.4/llvm.nix b/pkgs/development/compilers/llvm/3.4/llvm.nix index 30f2dba28831..0b29b04825a1 100644 --- a/pkgs/development/compilers/llvm/3.4/llvm.nix +++ b/pkgs/development/compilers/llvm/3.4/llvm.nix @@ -90,6 +90,6 @@ in stdenv.mkDerivation rec { homepage = http://llvm.org/; license = stdenv.lib.licenses.ncsa; maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ]; - platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin"]; + platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" "armv7l-linux"]; }; } diff --git a/pkgs/development/compilers/llvm/3.5/llvm.nix b/pkgs/development/compilers/llvm/3.5/llvm.nix index 4d0cb8930f57..7dc134b4fcfd 100644 --- a/pkgs/development/compilers/llvm/3.5/llvm.nix +++ b/pkgs/development/compilers/llvm/3.5/llvm.nix @@ -98,7 +98,7 @@ in stdenv.mkDerivation rec { homepage = http://llvm.org/; license = stdenv.lib.licenses.ncsa; maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric ]; - platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin"]; + platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" "armv7l-linux"]; }; } diff --git a/pkgs/development/compilers/openjdk/10.nix b/pkgs/development/compilers/openjdk/10.nix index d84b0c302426..9cc774727b71 100644 --- a/pkgs/development/compilers/openjdk/10.nix +++ b/pkgs/development/compilers/openjdk/10.nix @@ -4,8 +4,7 @@ , libjpeg, giflib , setJavaClassPath , minimal ? false -#, enableInfinality ? true # font rendering patch -, enableGnome2 ? true, gtk2, gnome_vfs, glib, GConf +, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf }: let @@ -20,18 +19,16 @@ let update = "10"; build = "46"; - baseurl = "http://hg.openjdk.java.net/jdk/jdk10"; repover = "jdk-${update}+${build}"; paxflags = if stdenv.isi686 then "msp" else "m"; - jdk10 = fetchurl { - url = "${baseurl}/archive/${repover}.tar.gz"; - sha256 = "1n5jccf2rw15hzwppnvy87bysb84g3fcnkxbjhj8gi0iv79dxlc7"; - }; + openjdk10 = stdenv.mkDerivation { name = "openjdk-${update}-b${build}"; - srcs = [ jdk10 ]; - sourceRoot = "."; + src = fetchurl { + url = "http://hg.openjdk.java.net/jdk-updates/jdk10u/archive/${repover}.tar.gz"; + sha256 = "1a2cjad816qilsigkq035rqzfhzmq5vaz1klilrrws456flbsjlg"; + }; outputs = [ "out" "jre" ]; @@ -41,13 +38,9 @@ let libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst libXi libXinerama libXcursor lndir fontconfig ] ++ lib.optionals (!minimal && enableGnome2) [ - gtk2 gnome_vfs GConf glib + gtk3 gnome_vfs GConf glib ]; - prePatch = '' - cd jdk10* - ''; - patches = [ ./fix-java-home-jdk10.patch ./read-truststore-from-env-jdk10.patch @@ -87,7 +80,7 @@ let NIX_LDFLAGS= lib.optionals (!minimal) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" ] ++ lib.optionals (!minimal && enableGnome2) [ - "-lgtk-x11-2.0" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2" + "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2" ]; buildFlags = [ "all" ]; @@ -120,18 +113,12 @@ let rm -rf $out/lib/openjdk/demo ${lib.optionalString minimal '' for d in $out/lib/openjdk/lib $jre/lib/openjdk/jre/lib; do - rm ''${d}/{libjsound,libjsoundalsa,libawt*,libfontmanager}.so + rm ''${d}/{libjsound,libjsoundalsa,libfontmanager}.so done ''} lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre - # Make sure cmm/*.pf are not symlinks: - # https://youtrack.jetbrains.com/issue/IDEA-147272 - # in 9, it seems no *.pf files end up in $out ... ? - # rm -rf $out/lib/openjdk/jre/lib/cmm - # ln -s {$jre,$out}/lib/openjdk/jre/lib/cmm - # Set PaX markings exes=$(file $out/lib/openjdk/bin/* $jre/lib/openjdk/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//') echo "to mark: *$exes*" @@ -148,13 +135,6 @@ let fi done - # Generate certificates. - ( - cd $jre/lib/openjdk/jre/lib/security - rm cacerts - perl ${./generate-cacerts.pl} $jre/lib/openjdk/jre/bin/keytool ${cacert}/etc/ssl/certs/ca-bundle.crt - ) - ln -s $out/lib/openjdk/bin $out/bin ln -s $jre/lib/openjdk/jre/bin $jre/bin ln -s $jre/lib/openjdk/jre $out/jre diff --git a/pkgs/development/compilers/openjdk/7.nix b/pkgs/development/compilers/openjdk/7.nix deleted file mode 100644 index 13f8bcfdb1de..000000000000 --- a/pkgs/development/compilers/openjdk/7.nix +++ /dev/null @@ -1,244 +0,0 @@ -{ stdenv, fetchurl, unzip, zip, procps, coreutils, alsaLib, ant, freetype -, which, bootjdk, nettools, xorg, file, cups -, fontconfig, cpio, cacert, perl, setJavaClassPath -, minimal ? false -}: - -let - - /** - * The JRE libraries are in directories that depend on the CPU. - */ - architecture = - if stdenv.system == "i686-linux" then - "i386" - else if stdenv.system == "x86_64-linux" then - "amd64" - else - throw "openjdk requires i686-linux or x86_64 linux"; - - update = "111"; - - build = "01"; - - # On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well. - paxflags = if stdenv.isi686 then "msp" else "m"; - - baseurl = "http://hg.openjdk.java.net/jdk7u/jdk7u"; - repover = "jdk7u${update}-b${build}"; - jdk7 = fetchurl { - url = "${baseurl}/archive/${repover}.tar.gz"; - sha256 = "0wgb7hr2gipx1jg28fnsjh7xa744sh1mgr6z3xivmnsfy3dm91gi"; - }; - langtools = fetchurl { - url = "${baseurl}/langtools/archive/${repover}.tar.gz"; - sha256 = "0x1xs923h6sma02cbp1whg735x8vcndh5k01b7rkf714g6rxwa0y"; - }; - hotspot = fetchurl { - url = "${baseurl}/hotspot/archive/${repover}.tar.gz"; - sha256 = "187apnsvnd4cfa7ss5g59dbh7x5ah8f1lwa2wvjfv055h2cmphpn"; - }; - corba = fetchurl { - url = "${baseurl}/corba/archive/${repover}.tar.gz"; - sha256 = "0vmxf5sgjcmkm7i1scanaa2x75a1byj8b36vcajlr6j7qmdx6r8c"; - }; - jdk = fetchurl { - url = "${baseurl}/jdk/archive/${repover}.tar.gz"; - sha256 = "1f8f2dgrjhx8aw1gzawrf8qggf5j0dygsla08bbsxhx5mc5a6cka"; - }; - jaxws = fetchurl { - url = "${baseurl}/jaxws/archive/${repover}.tar.gz"; - sha256 = "03982ajxm0hzany1jg009ym84vryx7a8qfi6wcgjxyxvk8vnz37c"; - }; - jaxp = fetchurl { - url = "${baseurl}/jaxp/archive/${repover}.tar.gz"; - sha256 = "0578h04y1ha60yjplsa8lqdjds9s2lxzgs9ybm9rs1rqzxmm0xmy"; - }; - openjdk = stdenv.mkDerivation rec { - name = "openjdk-7u${update}b${build}"; - - srcs = [ jdk7 langtools hotspot corba jdk jaxws jaxp ]; - sourceRoot = "."; - - outputs = [ "out" "jre" ]; - - buildInputs = - [ unzip procps ant which zip cpio nettools alsaLib - xorg.libX11 xorg.libXt xorg.libXext xorg.libXrender xorg.libXtst - xorg.libXi xorg.libXinerama xorg.libXcursor xorg.lndir - fontconfig perl file bootjdk - ]; - - NIX_CFLAGS_COMPILE = [ - "-Wno-error=deprecated-declarations" - "-Wno-error=format-overflow" # newly detected by gcc7 - ]; - - NIX_LDFLAGS = if minimal then null else "-lfontconfig -lXcursor -lXinerama"; - - postUnpack = '' - ls | grep jdk | grep -v '^jdk7u' | awk -F- '{print $1}' | while read p; do - mv $p-* $(ls | grep '^jdk7u')/$p - done - cd jdk7u-* - - sed -i -e "s@/usr/bin/test@${coreutils}/bin/test@" \ - -e "s@/bin/ls@${coreutils}/bin/ls@" \ - hotspot/make/linux/makefiles/sa.make - - sed -i "s@/bin/echo -e@${coreutils}/bin/echo -e@" \ - {jdk,corba}/make/common/shared/Defs-utils.gmk - - tar xf ${cups.src} - cupsDir=$(echo $(pwd)/cups-*) - makeFlagsArray+=(CUPS_HEADERS_PATH=$cupsDir) - ''; - - patches = [ - ./cppflags-include-fix.patch - ./fix-java-home.patch - ./paxctl.patch - ./read-truststore-from-env.patch - ./currency-date-range.patch - ]; - - NIX_NO_SELF_RPATH = true; - - makeFlags = [ - "SORT=${coreutils}/bin/sort" - "ALSA_INCLUDE=${alsaLib.dev}/include/alsa/version.h" - "FREETYPE_HEADERS_PATH=${freetype.dev}/include" - "FREETYPE_LIB_PATH=${freetype.out}/lib" - "MILESTONE=${update}" - "BUILD_NUMBER=b${build}" - "USRBIN_PATH=" - "COMPILER_PATH=" - "DEVTOOLS_PATH=" - "UNIXCOMMAND_PATH=" - "BOOTDIR=${bootjdk.home}" - "STATIC_CXX=false" - "UNLIMITED_CRYPTO=1" - "FULL_DEBUG_SYMBOLS=0" - ] ++ stdenv.lib.optional minimal "BUILD_HEADLESS=1"; - - configurePhase = "true"; - - preBuild = '' - # We also need to PaX-mark in the middle of the build - substituteInPlace hotspot/make/linux/makefiles/launcher.make \ - --replace XXX_PAXFLAGS_XXX ${paxflags} - substituteInPlace jdk/make/common/Program.gmk \ - --replace XXX_PAXFLAGS_XXX ${paxflags} - ''; - - installPhase = '' - mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk - - cp -av build/*/j2sdk-image/* $out/lib/openjdk - - # Move some stuff to top-level. - mv $out/lib/openjdk/include $out/include - mv $out/lib/openjdk/man $out/share/man - - # jni.h expects jni_md.h to be in the header search path. - ln -s $out/include/linux/*_md.h $out/include/ - - # Remove some broken manpages. - rm -rf $out/share/man/ja* - - # Remove crap from the installation. - rm -rf $out/lib/openjdk/demo $out/lib/openjdk/sample - - # Move the JRE to a separate output. - mv $out/lib/openjdk/jre $jre/lib/openjdk/ - mkdir $out/lib/openjdk/jre - lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre - - rm -rf $out/lib/openjdk/jre/bin - ln -s $out/lib/openjdk/bin $out/lib/openjdk/jre/bin - - # Set PaX markings - exes=$(file $out/lib/openjdk/bin/* $jre/lib/openjdk/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//') - echo "to mark: *$exes*" - for file in $exes; do - echo "marking *$file*" - paxmark ${paxflags} "$file" - done - - # Remove duplicate binaries. - for i in $(cd $out/lib/openjdk/bin && echo *); do - if [ "$i" = java ]; then continue; fi - if cmp -s $out/lib/openjdk/bin/$i $jre/lib/openjdk/jre/bin/$i; then - ln -sfn $jre/lib/openjdk/jre/bin/$i $out/lib/openjdk/bin/$i - fi - done - - # Generate certificates. - pushd $jre/lib/openjdk/jre/lib/security - rm cacerts - perl ${./generate-cacerts.pl} $jre/lib/openjdk/jre/bin/keytool ${cacert}/etc/ssl/certs/ca-bundle.crt - popd - - ln -s $out/lib/openjdk/bin $out/bin - ln -s $jre/lib/openjdk/jre/bin $jre/bin - ''; # */ - - # FIXME: this is unnecessary once the multiple-outputs branch is merged. - preFixup = '' - prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}" - patchELF $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-build-inputs - - # Set JAVA_HOME automatically. - mkdir -p $out/nix-support - cat <<EOF > $out/nix-support/setup-hook - if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out/lib/openjdk; fi - EOF - ''; - - postFixup = '' - # Build the set of output library directories to rpath against - LIBDIRS="" - for output in $outputs; do - LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \; | sort | uniq | tr '\n' ':'):$LIBDIRS" - done - - # Add the local library paths to remove dependencies on the bootstrap - for output in $outputs; do - OUTPUTDIR="$(eval echo \$$output)" - BINLIBS="$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)" - echo "$BINLIBS" | while read i; do - patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true - patchelf --shrink-rpath "$i" || true - done - done - - # Test to make sure that we don't depend on the bootstrap - for output in $outputs; do - if grep -q -r '${bootjdk}' $(eval echo \$$output); then - echo "Extraneous references to ${bootjdk} detected" - exit 1 - fi - done - ''; - - meta = { - homepage = http://openjdk.java.net/; - license = stdenv.lib.licenses.gpl2; - description = "The open-source Java Development Kit"; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.linux; - }; - - passthru = { - inherit architecture; - home = "${openjdk}/lib/openjdk"; - }; - }; -in openjdk diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix index 24cf1b8a0c93..705898a74f37 100644 --- a/pkgs/development/compilers/openjdk/8.nix +++ b/pkgs/development/compilers/openjdk/8.nix @@ -93,7 +93,7 @@ let ./004_add-fontconfig.patch ./005_enable-infinality.patch ] ++ lib.optionals (!minimal && enableGnome2) [ - ./swing-use-gtk.patch + ./swing-use-gtk-jdk8.patch ]; preConfigure = '' diff --git a/pkgs/development/compilers/openjdk/9.nix b/pkgs/development/compilers/openjdk/9.nix deleted file mode 100644 index 7ac3931c93d7..000000000000 --- a/pkgs/development/compilers/openjdk/9.nix +++ /dev/null @@ -1,262 +0,0 @@ -{ stdenv, lib, fetchurl, bash, cpio, pkgconfig, file, which, unzip, zip, cups, freetype -, alsaLib, bootjdk, cacert, perl, liberation_ttf, fontconfig, zlib, lndir -, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama, libXcursor -, libjpeg, giflib -, setJavaClassPath -, minimal ? false -#, enableInfinality ? true # font rendering patch -, enableGnome2 ? true, gtk2, gnome_vfs, glib, GConf -}: - -let - - /** - * The JRE libraries are in directories that depend on the CPU. - */ - architecture = - if stdenv.system == "i686-linux" then - "i386" - else if stdenv.system == "x86_64-linux" then - "amd64" - else - throw "openjdk requires i686-linux or x86_64 linux"; - - update = "9.0.4"; - build = "12"; - baseurl = "http://hg.openjdk.java.net/jdk-updates/jdk9u"; - repover = "jdk-${update}+${build}"; - paxflags = if stdenv.isi686 then "msp" else "m"; - jdk9 = fetchurl { - url = "${baseurl}/archive/${repover}.tar.gz"; - sha256 = "06hnrzkwxgrfq26il1mjyl6wgb7x3qym69pjbddhl9m29n2si3jh"; - }; - langtools = fetchurl { - url = "${baseurl}/langtools/archive/${repover}.tar.gz"; - sha256 = "16xqnqn773p6ywcdjx801vbng2skjal7svydn0s7wf3ldqzx64mi"; - }; - hotspot = fetchurl { - url = "${baseurl}/hotspot/archive/${repover}.tar.gz"; - sha256 = "0g5ddffl2qykrjf17ac9as60rd4sfyv7s2fpgjn86k4a69gkx93v"; - }; - corba = fetchurl { - url = "${baseurl}/corba/archive/${repover}.tar.gz"; - sha256 = "14585dzs2mfzgzrnbvc062pigngs35hajwpr22m6fzbm7580vnqk"; - }; - jdk = fetchurl { - url = "${baseurl}/jdk/archive/${repover}.tar.gz"; - sha256 = "16595jdg3y9zy70q8i615a7d6w0zzbydfxylvaq42wrsc7jw733h"; - }; - jaxws = fetchurl { - url = "${baseurl}/jaxws/archive/${repover}.tar.gz"; - sha256 = "1m1aspc1hq74w0bkasrfvp8ygs6psbc1l61vfw9244j2vgfahjgn"; - }; - jaxp = fetchurl { - url = "${baseurl}/jaxp/archive/${repover}.tar.gz"; - sha256 = "06ns2giw366vjivb6d46gqwfvfzkaddrgd1x6y8w37ywygp50lxm"; - }; - nashorn = fetchurl { - url = "${baseurl}/nashorn/archive/${repover}.tar.gz"; - sha256 = "0z6mlzvz1hh1yzli69qjlrcwqdjnivbjbqqrqi4hhpls6z0a2ch7"; - }; - openjdk9 = stdenv.mkDerivation { - name = "openjdk-${update}-b${build}"; - - srcs = [ jdk9 langtools hotspot corba jdk jaxws jaxp nashorn ]; - sourceRoot = "."; - - outputs = [ "out" "jre" ]; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - cpio file which unzip zip perl bootjdk zlib cups freetype alsaLib - libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst - libXi libXinerama libXcursor lndir fontconfig - ] ++ lib.optionals (!minimal && enableGnome2) [ - gtk2 gnome_vfs GConf glib - ]; - - #move the seven other source dirs under the main jdk8u directory, - #with version suffixes removed, as the remainder of the build will expect - prePatch = '' - mainDir=$(find . -maxdepth 1 -name jdk9\*); - find . -maxdepth 1 -name \*jdk\* -not -name jdk9\* | awk -F- '{print $1}' | while read p; do - mv $p-* $mainDir/$p - done - cd $mainDir - ''; - - patches = [ - ./fix-java-home-jdk9.patch - ./read-truststore-from-env-jdk9.patch - ./currency-date-range-jdk8.patch - #] ++ lib.optionals (!minimal && enableInfinality) [ - # ./004_add-fontconfig.patch - # ./005_enable-infinality.patch - ] ++ lib.optionals (!minimal && enableGnome2) [ - ./swing-use-gtk-jdk9.patch - ]; - - preConfigure = '' - chmod +x configure - substituteInPlace configure --replace /bin/bash "${bash}/bin/bash" - - configureFlagsArray=( - "--with-boot-jdk=${bootjdk.home}" - "--with-update-version=${update}" - "--with-build-number=${build}" - "--with-milestone=fcs" - "--enable-unlimited-crypto" - "--disable-debug-symbols" - "--disable-freetype-bundling" - "--with-zlib=system" - "--with-giflib=system" - "--with-stdc++lib=dynamic" - - # glibc 2.24 deprecated readdir_r so we need this - # See https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg49006.html - "--with-extra-cflags=-Wno-error=deprecated-declarations -Wno-error=format-contains-nul -Wno-error=unused-result" - '' - + lib.optionalString minimal "\"--enable-headless-only\"" - + ");" - # https://bugzilla.redhat.com/show_bug.cgi?id=1306558 - # https://github.com/JetBrains/jdk8u/commit/eaa5e0711a43d64874111254d74893fa299d5716 - + stdenv.lib.optionalString stdenv.cc.isGNU '' - NIX_CFLAGS_COMPILE+=" -fno-lifetime-dse -fno-delete-null-pointer-checks -std=gnu++98 -Wno-error" - ''; - - NIX_LDFLAGS= lib.optionals (!minimal) [ - "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" - ] ++ lib.optionals (!minimal && enableGnome2) [ - "-lgtk-x11-2.0" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2" - ]; - - buildFlags = [ "all" ]; - - installPhase = '' - mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk - - cp -av build/*/images/jdk/* $out/lib/openjdk - - # Remove some broken manpages. - rm -rf $out/lib/openjdk/man/ja* - - # Mirror some stuff in top-level. - mkdir $out/include $out/share/man - ln -s $out/lib/openjdk/include/* $out/include/ - ln -s $out/lib/openjdk/man/* $out/share/man/ - - # jni.h expects jni_md.h to be in the header search path. - ln -s $out/include/linux/*_md.h $out/include/ - - # Copy the JRE to a separate output and setup fallback fonts - cp -av build/*/images/jre $jre/lib/openjdk/ - mkdir $out/lib/openjdk/jre - ${lib.optionalString (!minimal) '' - mkdir -p $jre/lib/openjdk/jre/lib/fonts/fallback - lndir ${liberation_ttf}/share/fonts/truetype $jre/lib/openjdk/jre/lib/fonts/fallback - ''} - - # Remove crap from the installation. - rm -rf $out/lib/openjdk/demo - ${lib.optionalString minimal '' - for d in $out/lib/openjdk/lib $jre/lib/openjdk/jre/lib; do - rm ''${d}/{libjsound,libjsoundalsa,libawt*,libfontmanager}.so - done - ''} - - lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre - - # Make sure cmm/*.pf are not symlinks: - # https://youtrack.jetbrains.com/issue/IDEA-147272 - # in 9, it seems no *.pf files end up in $out ... ? - # rm -rf $out/lib/openjdk/jre/lib/cmm - # ln -s {$jre,$out}/lib/openjdk/jre/lib/cmm - - # Set PaX markings - exes=$(file $out/lib/openjdk/bin/* $jre/lib/openjdk/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//') - echo "to mark: *$exes*" - for file in $exes; do - echo "marking *$file*" - paxmark ${paxflags} "$file" - done - - # Remove duplicate binaries. - for i in $(cd $out/lib/openjdk/bin && echo *); do - if [ "$i" = java ]; then continue; fi - if cmp -s $out/lib/openjdk/bin/$i $jre/lib/openjdk/jre/bin/$i; then - ln -sfn $jre/lib/openjdk/jre/bin/$i $out/lib/openjdk/bin/$i - fi - done - - # Generate certificates. - ( - cd $jre/lib/openjdk/jre/lib/security - rm cacerts - perl ${./generate-cacerts.pl} $jre/lib/openjdk/jre/bin/keytool ${cacert}/etc/ssl/certs/ca-bundle.crt - ) - - ln -s $out/lib/openjdk/bin $out/bin - ln -s $jre/lib/openjdk/jre/bin $jre/bin - ln -s $jre/lib/openjdk/jre $out/jre - ''; - - # FIXME: this is unnecessary once the multiple-outputs branch is merged. - preFixup = '' - prefix=$jre stripDirs "$stripDebugList" "''${stripDebugFlags:--S}" - patchELF $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-build-inputs - - # Set JAVA_HOME automatically. - mkdir -p $out/nix-support - cat <<EOF > $out/nix-support/setup-hook - if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out/lib/openjdk; fi - EOF - ''; - - postFixup = '' - # Build the set of output library directories to rpath against - LIBDIRS="" - for output in $outputs; do - LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort | uniq | tr '\n' ':'):$LIBDIRS" - done - - # Add the local library paths to remove dependencies on the bootstrap - for output in $outputs; do - OUTPUTDIR=$(eval echo \$$output) - BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*) - echo "$BINLIBS" | while read i; do - patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true - patchelf --shrink-rpath "$i" || true - done - done - - # Test to make sure that we don't depend on the bootstrap - for output in $outputs; do - if grep -q -r '${bootjdk}' $(eval echo \$$output); then - echo "Extraneous references to ${bootjdk} detected" - exit 1 - fi - done - ''; - - meta = with stdenv.lib; { - homepage = http://openjdk.java.net/; - license = licenses.gpl2; - description = "The open-source Java Development Kit"; - maintainers = with maintainers; [ edwtjo ]; - platforms = platforms.linux; - }; - - passthru = { - inherit architecture; - home = "${openjdk9}/lib/openjdk"; - }; - }; -in openjdk9 diff --git a/pkgs/development/compilers/openjdk/bootstrap.nix b/pkgs/development/compilers/openjdk/bootstrap.nix index 668ca552adf1..3c29df7ec78e 100644 --- a/pkgs/development/compilers/openjdk/bootstrap.nix +++ b/pkgs/development/compilers/openjdk/bootstrap.nix @@ -1,5 +1,5 @@ { stdenv -, runCommand, fetchurl, file +, runCommand, fetchurl, file, zlib , version }: @@ -7,30 +7,19 @@ assert stdenv.hostPlatform.libc == "glibc"; let - # !!! These should be on nixos.org + fetchboot = version: arch: sha256: fetchurl { + name = "openjdk${version}-bootstrap-${arch}-linux.tar.xz"; + url = "http://tarballs.nixos.org/openjdk/2018-03-31/${version}/${arch}-linux.tar.xz"; + inherit sha256; + }; + src = if stdenv.hostPlatform.system == "x86_64-linux" then - (if version == "8" then - fetchurl { - url = "https://www.dropbox.com/s/a0lsq2ig4uguky5/openjdk8-bootstrap-x86_64-linux.tar.xz?dl=1"; - sha256 = "18zqx6jhm3lizn9hh6ryyqc9dz3i96pwaz8f6nxfllk70qi5gvks"; - } - else if version == "7" then - fetchurl { - url = "https://www.dropbox.com/s/rssfbeommrfbsjf/openjdk7-bootstrap-x86_64-linux.tar.xz?dl=1"; - sha256 = "024gg2sgg4labxbc1nhn8lxls2p7d9h3b82hnsahwaja2pm1hbra"; - } + (if version == "10" then fetchboot "10" "x86_64" "08085fsxc1qhqiv3yi38w8lrg3vm7s0m2yvnwr1c92v019806yq2" + else if version == "8" then fetchboot "8" "x86_64" "18zqx6jhm3lizn9hh6ryyqc9dz3i96pwaz8f6nxfllk70qi5gvks" else throw "No bootstrap for version") else if stdenv.hostPlatform.system == "i686-linux" then - (if version == "8" then - fetchurl { - url = "https://www.dropbox.com/s/rneqjhlerijsw74/openjdk8-bootstrap-i686-linux.tar.xz?dl=1"; - sha256 = "1yx04xh8bqz7amg12d13rw5vwa008rav59mxjw1b9s6ynkvfgqq9"; - } - else if version == "7" then - fetchurl { - url = "https://www.dropbox.com/s/6xe64td7eg2wurs/openjdk7-bootstrap-i686-linux.tar.xz?dl=1"; - sha256 = "0xwqjk1zx8akziw8q9sbjc1rs8s7c0w6mw67jdmmi26cwwp8ijnx"; - } + (if version == "10" then fetchboot "10" "i686" "1blb9gyzp8gfyggxvggqgpcgfcyi00ndnnskipwgdm031qva94p7" + else if version == "8" then fetchboot "8" "i686" "1yx04xh8bqz7amg12d13rw5vwa008rav59mxjw1b9s6ynkvfgqq9" else throw "No bootstrap for version") else throw "No bootstrap for system"; @@ -45,7 +34,7 @@ let find "$out" -type f -print0 | while IFS= read -r -d "" elf; do isELF "$elf" || continue patchelf --set-interpreter $(cat "${stdenv.cc}/nix-support/dynamic-linker") "$elf" || true - patchelf --set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:$LIBDIRS" "$elf" || true + patchelf --set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:${zlib}/lib:$LIBDIRS" "$elf" || true done # Temporarily, while NixOS's OpenJDK bootstrap tarball doesn't have PaX markings: diff --git a/pkgs/development/compilers/openjdk/cppflags-include-fix.patch b/pkgs/development/compilers/openjdk/cppflags-include-fix.patch deleted file mode 100644 index 8931c122538f..000000000000 --- a/pkgs/development/compilers/openjdk/cppflags-include-fix.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur openjdk-orig/jdk/make/sun/awt/mawt.gmk openjdk/jdk/make/sun/awt/mawt.gmk ---- openjdk-orig/jdk/make/sun/awt/mawt.gmk 2012-08-28 19:13:16.000000000 -0400 -+++ openjdk/jdk/make/sun/awt/mawt.gmk 2013-01-22 11:56:22.315418708 -0500 -@@ -234,12 +234,6 @@ - endif # !HEADLESS - endif # PLATFORM - --ifeq ($(PLATFORM), linux) -- # Checking for the X11/extensions headers at the additional location -- CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \ -- $(wildcard /usr/include/X11/extensions)) --endif -- - ifeq ($(PLATFORM), macosx)) - CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \ - -I$(OPENWIN_HOME)/include diff --git a/pkgs/development/compilers/openjdk/currency-date-range.patch b/pkgs/development/compilers/openjdk/currency-date-range.patch deleted file mode 100644 index b1c461591d1e..000000000000 --- a/pkgs/development/compilers/openjdk/currency-date-range.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Naur openjdk-7u65-b32-upstream/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java openjdk-7u65-b32/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java ---- openjdk-7u65-b32-upstream/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java 2014-07-17 05:42:14.000000000 -0430 -+++ openjdk-7u65-b32/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java 2014-12-30 10:15:50.327905933 -0430 -@@ -281,8 +281,8 @@ - checkCurrencyCode(newCurrency); - String timeString = currencyInfo.substring(4, length - 4); - long time = format.parse(timeString).getTime(); -- if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) { -- throw new RuntimeException("time is more than 10 years from present: " + time); -+ if (Math.abs(time - System.currentTimeMillis()) > ((long) 20) * 365 * 24 * 60 * 60 * 1000) { -+ throw new RuntimeException("time is more than 20 years from present: " + time); - } - specialCaseCutOverTimes[specialCaseCount] = time; - specialCaseOldCurrencies[specialCaseCount] = oldCurrency; diff --git a/pkgs/development/compilers/openjdk/fix-java-home-jdk9.patch b/pkgs/development/compilers/openjdk/fix-java-home-jdk9.patch deleted file mode 100644 index f9755d58e48f..000000000000 --- a/pkgs/development/compilers/openjdk/fix-java-home-jdk9.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/hotspot/src/os/linux/vm/os_linux.cpp 2017-07-04 23:09:02.533972226 -0400 -+++ b/hotspot/src/os/linux/vm/os_linux.cpp 2017-07-04 23:07:52.118338845 -0400 -@@ -2318,10 +2318,7 @@ - assert(ret, "cannot locate libjvm"); - char *rp = NULL; - if (ret && dli_fname[0] != '\0') { -- rp = realpath(dli_fname, buf); -- } -- if (rp == NULL) { -- return; -+ snprintf(buf, buflen, "%s", dli_fname); - } - - if (Arguments::sun_java_launcher_is_altjvm()) { diff --git a/pkgs/development/compilers/openjdk/fix-java-home.patch b/pkgs/development/compilers/openjdk/fix-java-home.patch deleted file mode 100644 index 5def344f1717..000000000000 --- a/pkgs/development/compilers/openjdk/fix-java-home.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff -ru -x '*~' openjdk-orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ---- openjdk-orig/hotspot/src/os/linux/vm/os_linux.cpp 2013-09-06 20:22:03.000000000 +0200 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2014-01-24 22:44:08.223857012 +0100 -@@ -2358,12 +2358,10 @@ - CAST_FROM_FN_PTR(address, os::jvm_path), - dli_fname, sizeof(dli_fname), NULL); - assert(ret, "cannot locate libjvm"); - char *rp = NULL; - if (ret && dli_fname[0] != '\0') { -- rp = realpath(dli_fname, buf); -+ snprintf(buf, buflen, "%s", dli_fname); - } -- if (rp == NULL) -- return; - - if (Arguments::created_by_gamma_launcher()) { - // Support for the gamma launcher. Typical value for buf is diff --git a/pkgs/development/compilers/openjdk/paxctl.patch b/pkgs/development/compilers/openjdk/paxctl.patch deleted file mode 100644 index 12528a601cc8..000000000000 --- a/pkgs/development/compilers/openjdk/paxctl.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/hotspot/make/linux/makefiles/launcher.make b/hotspot/make/linux/makefiles/launcher.make -index 34bbcd6..41b9332 100644 ---- a/hotspot/make/linux/makefiles/launcher.make -+++ b/hotspot/make/linux/makefiles/launcher.make -@@ -83,6 +83,8 @@ $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE) - $(QUIETLY) echo Linking launcher... - $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK) - $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER) -+ paxctl -c $(LAUNCHER) -+ paxctl -zex -XXX_PAXFLAGS_XXX $(LAUNCHER) - $(QUIETLY) $(LINK_LAUNCHER/POST_HOOK) - - $(LAUNCHER): $(LAUNCHER_SCRIPT) -diff --git a/jdk/make/common/Program.gmk b/jdk/make/common/Program.gmk -index 091800d..1de8cb4 100644 ---- a/jdk/make/common/Program.gmk -+++ b/jdk/make/common/Program.gmk -@@ -60,6 +60,10 @@ ACTUAL_PROGRAM = $(ACTUAL_PROGRAM_DIR)/$(ACTUAL_PROGRAM_NAME) - program_default_rule: all - - program: $(ACTUAL_PROGRAM) -+ if [[ "$(PROGRAM)" = "java" ]]; then \ -+ paxctl -c $(ACTUAL_PROGRAM); \ -+ paxctl -zex -XXX_PAXFLAGS_XXX $(ACTUAL_PROGRAM); \ -+ fi - - # Work-around for missing processor specific mapfiles - ifndef CROSS_COMPILE_ARCH diff --git a/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk9.patch b/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk9.patch deleted file mode 100644 index cb8d59ff8063..000000000000 --- a/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk9.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/jdk/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java 2017-06-26 21:48:25.000000000 -0400 -+++ b/jdk/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java.new 2017-07-05 20:45:57.491295030 -0400 -@@ -71,6 +71,7 @@ - * - * The preference of the default trusted KeyStore is: - * javax.net.ssl.trustStore -+ * system environment variable JAVAX_NET_SSL_TRUSTSTORE - * jssecacerts - * cacerts - */ -@@ -144,6 +145,9 @@ - String temporaryName = ""; - File temporaryFile = null; - long temporaryTime = 0L; -+ if (storePropName == null){ -+ storePropName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE"); -+ } - if (!"NONE".equals(storePropName)) { - String[] fileNames = - new String[] {storePropName, defaultStore}; diff --git a/pkgs/development/compilers/openjdk/read-truststore-from-env.patch b/pkgs/development/compilers/openjdk/read-truststore-from-env.patch deleted file mode 100644 index 8fb0f409d0ab..000000000000 --- a/pkgs/development/compilers/openjdk/read-truststore-from-env.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -ur openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java ---- openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-07-17 12:12:14.000000000 +0200 -+++ openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-12-09 13:31:27.821960372 +0100 -@@ -158,6 +158,7 @@ - /* - * Try: - * javax.net.ssl.trustStore (if this variable exists, stop) -+ * system environment variable JAVAX_NET_SSL_TRUSTSTORE - * jssecacerts - * cacerts - * -@@ -165,6 +166,9 @@ - */ - - storeFileName = props.get("trustStore"); -+ if (storeFileName == null) { -+ storeFileName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE"); -+ } - if (!"NONE".equals(storeFileName)) { - if (storeFileName != null) { - storeFile = new File(storeFileName); diff --git a/pkgs/development/compilers/openjdk/swing-use-gtk.patch b/pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch index 9538aade6726..9538aade6726 100644 --- a/pkgs/development/compilers/openjdk/swing-use-gtk.patch +++ b/pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch diff --git a/pkgs/development/compilers/openjdk/swing-use-gtk-jdk9.patch b/pkgs/development/compilers/openjdk/swing-use-gtk-jdk9.patch deleted file mode 100644 index 07d95ba71b8a..000000000000 --- a/pkgs/development/compilers/openjdk/swing-use-gtk-jdk9.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ru3 a/jdk/src/share/classes/javax/swing/UIManager.java b/jdk/src/share/classes/javax/swing/UIManager.java ---- a/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java 2016-07-26 00:41:37.000000000 +0300 -+++ b/jdk/src/java.desktop/share/classes/javax/swing/UIManager.java 2016-10-02 22:46:01.890071761 +0300 -@@ -607,11 +607,9 @@ - if (osType == OSInfo.OSType.WINDOWS) { - return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"; - } else { -- String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop")); - Toolkit toolkit = Toolkit.getDefaultToolkit(); -- if ("gnome".equals(desktop) && -- toolkit instanceof SunToolkit && -- ((SunToolkit) toolkit).isNativeGTKAvailable()) { -+ if (toolkit instanceof SunToolkit && -+ ((SunToolkit) toolkit).isNativeGTKAvailable()) { - // May be set on Linux and Solaris boxs. - return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel"; - } -@@ -1341,7 +1339,7 @@ - lafName = (String) lafData.remove("defaultlaf"); - } - if (lafName == null) { -- lafName = getCrossPlatformLookAndFeelClassName(); -+ lafName = getSystemLookAndFeelClassName(); - } - lafName = swingProps.getProperty(defaultLAFKey, lafName); - diff --git a/pkgs/development/compilers/oraclejdk/jdk9-linux.nix b/pkgs/development/compilers/oraclejdk/jdk9-linux.nix deleted file mode 100644 index 87f2e49b4431..000000000000 --- a/pkgs/development/compilers/oraclejdk/jdk9-linux.nix +++ /dev/null @@ -1,158 +0,0 @@ -{ swingSupport ? true -, stdenv -, requireFile -, makeWrapper -, unzip -, file -, xorg ? null -, packageType ? "JDK" # JDK, JRE, or ServerJRE -, pluginSupport ? true -, glib -, libxml2 -, ffmpeg_2 -, libxslt -, libGL -, freetype -, fontconfig -, gtk2 -, pango -, cairo -, alsaLib -, atk -, gdk_pixbuf -, zlib -, elfutils -, setJavaClassPath -}: - -assert stdenv.system == "x86_64-linux"; -assert swingSupport -> xorg != null; - -let - version = "9.0.4"; - - downloadUrlBase = http://www.oracle.com/technetwork/java/javase/downloads; - - rSubPaths = [ - "lib/jli" - "lib/server" - "lib" - ]; - -in - -let result = stdenv.mkDerivation rec { - name = if packageType == "JDK" then "oraclejdk-${version}" - else if packageType == "JRE" then "oraclejre-${version}" - else if packageType == "ServerJRE" then "oracleserverjre-${version}" - else abort "unknown package Type ${packageType}"; - - src = - if packageType == "JDK" then - requireFile { - name = "jdk-${version}_linux-x64_bin.tar.gz"; - url = "${downloadUrlBase}/jdk9-downloads-3848520.html"; - sha256 = "18nsjn64wkfmyb09wf2k7lvhazf83cs3dyichr038vl1gs3ymi4h"; - } - else if packageType == "JRE" then - requireFile { - name = "jre-${version}_linux-x64_bin.tar.gz"; - url = "${downloadUrlBase}/jre9-downloads-3848532.html"; - sha256 = "01fp079mr04nniyf06w8vd47qxr6rly1lbh8dqkddb8fp9h6a79k"; - } - else if packageType == "ServerJRE" then - requireFile { - name = "serverjre-${version}_linux-x64_bin.tar.gz"; - url = "${downloadUrlBase}/server-jre9-downloads-3848530.html"; - sha256 = "1jlpa4mn306hx0p9jcw3i6cpdvnng29dwjsymgcan56810q6p6yj"; - } - else abort "unknown package Type ${packageType}"; - - nativeBuildInputs = [ file ]; - - buildInputs = [ makeWrapper ]; - - # See: https://github.com/NixOS/patchelf/issues/10 - dontStrip = 1; - - installPhase = '' - cd .. - - # Set PaX markings - exes=$(file $sourceRoot/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//') - for file in $exes; do - paxmark m "$file" - # On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well. - ${stdenv.lib.optionalString stdenv.isi686 ''paxmark msp "$file"''} - done - - mv $sourceRoot $out - - shopt -s extglob - for file in $out/* - do - if test -f $file ; then - rm $file - fi - done - - if test -z "$pluginSupport"; then - rm -f $out/bin/javaws - fi - - mkdir $out/lib/plugins - ln -s $out/lib/libnpjp2.so $out/lib/plugins - - # for backward compatibility - ln -s $out $out/jre - - mkdir -p $out/nix-support - printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs - - # Set JAVA_HOME automatically. - cat <<EOF >> $out/nix-support/setup-hook - if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi - EOF - ''; - - postFixup = '' - rpath+="''${rpath:+:}${stdenv.lib.concatStringsSep ":" (map (a: "$out/${a}") rSubPaths)}" - - # 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" {} \; - - # Oracle Java Mission Control needs to know where libgtk-x11 and related is - if test -x $out/bin/jmc; then - wrapProgram "$out/bin/jmc" \ - --suffix-each LD_LIBRARY_PATH ':' "$rpath" - fi - ''; - - /** - * libXt is only needed on amd64 - */ - libraries = - [stdenv.cc.libc glib libxml2 ffmpeg_2 libxslt libGL xorg.libXxf86vm alsaLib fontconfig freetype pango gtk2 cairo gdk_pixbuf atk zlib elfutils] ++ - (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; - - passthru.mozillaPlugin = "/lib/plugins"; - - passthru.jre = result; # FIXME: use multiple outputs or return actual JRE package - - passthru.home = result; - - # for backward compatibility - passthru.architecture = ""; - - meta = with stdenv.lib; { - license = licenses.unfree; - platforms = [ "x86_64-linux" ]; # some inherit jre.meta.platforms - }; - -}; in result diff --git a/pkgs/development/compilers/polyml/default.nix b/pkgs/development/compilers/polyml/default.nix index 390d37dd245f..de5b85055273 100644 --- a/pkgs/development/compilers/polyml/default.nix +++ b/pkgs/development/compilers/polyml/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { name = "polyml-${version}"; - version = "5.7"; + version = "5.7.1"; prePatch = stdenv.lib.optionalString stdenv.isDarwin '' substituteInPlace configure.ac --replace stdc++ c++ @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { owner = "polyml"; repo = "polyml"; rev = "v${version}"; - sha256 = "10nsljmcl0zjbcc7ifc991ypwfwq5gh4rcp5rg4nnb706c6bs16y"; + sha256 = "0j0wv3ijfrjkfngy7dswm4k1dchk3jak9chl5735dl8yrl8mq755"; }; meta = with stdenv.lib; { diff --git a/pkgs/development/compilers/purescript/psc-package/default.nix b/pkgs/development/compilers/purescript/psc-package/default.nix index 451722aea060..d94179e16fe9 100644 --- a/pkgs/development/compilers/purescript/psc-package/default.nix +++ b/pkgs/development/compilers/purescript/psc-package/default.nix @@ -4,13 +4,13 @@ with lib; mkDerivation rec { pname = "psc-package"; - version = "0.2.5"; + version = "0.3.2"; src = fetchFromGitHub { owner = "purescript"; repo = pname; rev = "v${version}"; - sha256 = "15g0l8g8l6m5x4f73w68r9iav091x12b3wjxh0rx3ggnj093g6j1"; + sha256 = "1zpzcyh82xl0grvgcj8b7yzh053i9z94kbym5qrv413pcx7w50cm"; }; isLibrary = false; diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix index 9b488bab5b3b..44d96bc4ad1d 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.23.0"; + version = "1.24.1"; - # fetch hashes by running `print-hashes.sh 1.23.0` + # fetch hashes by running `print-hashes.sh 1.24.1` hashes = { - 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"; + i686-unknown-linux-gnu = "a483576bb2ab237aa1ef62b66c0814f934afd8129d7c9748cb9a75da4a678c98"; + x86_64-unknown-linux-gnu = "4567e7f6e5e0be96e9a5a7f5149b5452828ab6a386099caca7931544f45d5327"; + armv7-unknown-linux-gnueabihf = "1169ab005b771c4befcdab536347a90242cae544b6b76eccd0f76796b61a534c"; + aarch64-unknown-linux-gnu = "64bb25a9689b18ddadf025b90d9bdb150b809ebfb74432dc69cc2e46120adbb2"; + i686-apple-darwin = "c96f7579e2406220895da80a989daaa194751c141e112ebe95761f2ed4ecb662"; + x86_64-apple-darwin = "9d4aacdb5849977ea619d399903c9378163bd9c76ea11dac5ef6eca27849f501"; }; platform = diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index dd15580c11b8..d9a36273ce1d 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -6,11 +6,11 @@ let rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {})); - version = "1.24.0"; - cargoVersion = "0.24.0"; + version = "1.25.0"; + cargoVersion = "0.26.0"; src = fetchurl { url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; - sha256 = "17v3jpyky8vkkgai5yd2zr8zl87qpgj6dx99gx27x1sf0kv7d0mv"; + sha256 = "0baxjr99311lvwdq0s38bipbnj72pn6fgbk6lcq7j555xq53mxpf"; }; in rec { rustc = callPackage ./rustc.nix { diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix index 39b84ae6a365..0da3e9f0fd1d 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -9,11 +9,11 @@ stdenv.mkDerivation rec { name = "sbcl-${version}"; - version = "1.4.4"; + version = "1.4.6"; src = fetchurl { url = "mirror://sourceforge/project/sbcl/sbcl/${version}/${name}-source.tar.bz2"; - sha256 = "1k6v5b8qv7vyxvh8asx6phf2hbapx5pp5p5j47hgnq123fwnh4fa"; + sha256 = "0y46zgg3lamaqqhxbqmbwzvdakzvc9j07d0ci8f57pfl549v04a4"; }; patchPhase = '' diff --git a/pkgs/development/compilers/swift/default.nix b/pkgs/development/compilers/swift/default.nix index fc142a4026bd..abbfdd2abb72 100644 --- a/pkgs/development/compilers/swift/default.nix +++ b/pkgs/development/compilers/swift/default.nix @@ -37,7 +37,7 @@ }: let - v_major = "4.0.3"; + v_major = "4.1"; version = "${v_major}-RELEASE"; version_friendly = "${v_major}"; @@ -55,15 +55,15 @@ let # For more inforation, see: https://github.com/apple/swift/pull/3594#issuecomment-234169759 clang = fetch { repo = "swift-clang"; - sha256 = "0zm624iwiprk3c3nzqf4p1fd9zqic4yi3jv51cw3249ax4x6vy10"; + sha256 = "0j8bi6jv4m4hqiib02q5cvnxd9j6bwiri853x6px86vai3mdff0h"; }; llvm = fetch { repo = "swift-llvm"; - sha256 = "11vw6461c0cdvwm1wna1a5709fjj14hzp6br6jg94p4f6jp3yv4d"; + sha256 = "03558f5zbchqvdabi3x9ahyz4xkmj7w69gazivz372832lgr9zfh"; }; compilerrt = fetch { repo = "swift-compiler-rt"; - sha256 = "1hj4qaj4c9n2wzg2cvarbyl0n708zd1dlw4zkzq07fjxxqs36nfa"; + sha256 = "1wkymmxi2v759xkwlzfrq9rivndjfvp6ikrzz10mvvrvyvrgwqnl"; }; cmark = fetch { repo = "swift-cmark"; @@ -71,32 +71,32 @@ let }; lldb = fetch { repo = "swift-lldb"; - sha256 = "0yk5qg85008vcn63vn2jpn5ls9pdhda222p2w1cfkrj27k5k8vqr"; + sha256 = "09x3d3bc6rn9g6jpi3fb120c4r2carsmqla4bq4scjrs0867jz9m"; }; llbuild = fetch { repo = "swift-llbuild"; - sha256 = "0jffw6z1s6ck1i05brw59x6vsg7zrxbz5n2wz72fj29rh3nppc7a"; + sha256 = "04y0ihfyam2n671vmpk9gy0gb9lb3ivh6mr19862p5kg5bmrcic1"; }; pm = fetch { repo = "swift-package-manager"; - sha256 = "0xj070b8fii7ijfsnyq4fxgv6569vdrg0yippi85h2p1l7s9aagh"; + sha256 = "08d87fc29qq7m92jaxkiczsa7b567pwbibiwwkzdrj6a0gr11qn3"; }; xctest = fetch { repo = "swift-corelibs-xctest"; - sha256 = "0l355wq8zfwrpv044xf4smjwbm0bmib360748n8cwls3vkr9l2yv"; + sha256 = "1alkgxx8jsr2jjv2kchnjaaddb1byjwim015m1z3qxh6lknqm0k5"; }; foundation = fetch { repo = "swift-corelibs-foundation"; - sha256 = "0s7yc5gsbd96a4bs8c6q24dyfjm4xhcr2nzhl2ics8dmi60j15s4"; + sha256 = "06pbhb7wg4q5qgprhiyzbqy6hssga7xxjclhlh81gd6rvfd6bxvw"; }; libdispatch = fetch { repo = "swift-corelibs-libdispatch"; - sha256 = "0x8zzq3shhvmhq4sbhaaa0ddiv3nw347pz6ayym6jyzq7j9n15ia"; + sha256 = "198vskbajch8s168a649qz5an92i2mxmmmzcjlgxlzh38fgxri0n"; fetchSubmodules = true; }; swift = fetch { repo = "swift"; - sha256 = "0a1gq0k5701i418f0qi7kywv16q7vh4a4wp0f6fpyv4sjkq27msx"; + sha256 = "1flvr12bg8m4k44yq0xy9qrllv5rpxgxisjgbpakk5p3myfsx7ky"; }; }; @@ -132,19 +132,6 @@ let install_destdir=$SWIFT_INSTALL_DIR \ extra_cmake_options="${stdenv.lib.concatStringsSep "," cmakeFlags}"''; - # from llvm/4/llvm.nix - sigaltstackPatch = fetchpatch { - name = "sigaltstack.patch"; # for glibc-2.26 - url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff; - sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi"; - }; - - # https://bugs.swift.org/browse/SR-6409 - sigunusedPatch = fetchpatch { - name = "sigunused.patch"; - url = "https://github.com/apple/swift-llbuild/commit/303a89bc6da606c115560921a452686aa0655f5e.diff"; - sha256 = "04sw7ym1grzggj1v3xrzr2ljxz8rf9rnn9n5fg1xjbwlrdagkc7m"; - }; in stdenv.mkDerivation rec { name = "swift-${version_friendly}"; @@ -179,7 +166,7 @@ stdenv.mkDerivation rec { configurePhase = '' cd .. - + export INSTALLABLE_PACKAGE=$PWD/swift.tar.gz mkdir build install @@ -236,20 +223,18 @@ stdenv.mkDerivation rec { '' + '' patch -p1 -d swift -i ${./patches/0001-build-presets-linux-don-t-require-using-Ninja.patch} patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch} - patch -p1 -d swift -i ${./patches/0003-build-presets-linux-disable-tests.patch} patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch} - # https://sourceware.org/glibc/wiki/Release/2.26#Removal_of_.27xlocale.h.27 - patch -p1 -i ${./patches/remove_xlocale.patch} - # https://bugs.swift.org/browse/SR-4633 - patch -p1 -d swift -i ${./patches/icu59.patch} + + sed -i swift/utils/build-presets.ini \ + -e 's/^test-installable-package$/# \0/' \ + -e 's/^test$/# \0/' \ + -e 's/^validation-test$/# \0/' \ + -e 's/^long-test$/# \0/' # https://bugs.swift.org/browse/SR-5779 sed -i -e 's|"-latomic"|"-Wl,-rpath,${clang.cc.gcc.lib}/lib" "-L${clang.cc.gcc.lib}/lib" "-latomic"|' swift/cmake/modules/AddSwift.cmake - # https://bugs.swift.org/browse/SR-4838 - sed -i -e '30i#include <functional>' lldb/include/lldb/Utility/TaskPool.h - - substituteInPlace clang/lib/Driver/ToolChains.cpp \ + substituteInPlace clang/lib/Driver/ToolChains/Linux.cpp \ --replace ' addPathIfExists(D, SysRoot + "/usr/lib", Paths);' \ ' addPathIfExists(D, SysRoot + "/usr/lib", Paths); addPathIfExists(D, "${glibc}/lib", Paths);' patch -p1 -d clang -i ${./purity.patch} @@ -258,19 +243,15 @@ stdenv.mkDerivation rec { sed -i 's,curses,ncurses,' llbuild/*/*/CMakeLists.txt # This test fails on one of my machines, not sure why. - # Disabling for now. + # Disabling for now. rm llbuild/tests/Examples/buildsystem-capi.llbuild PREFIX=''${out/#\/} substituteInPlace swift-corelibs-xctest/build_script.py \ --replace usr "$PREFIX" substituteInPlace swiftpm/Utilities/bootstrap \ - --replace "usr" "$PREFIX" - '' + stdenv.lib.optionalString (stdenv ? glibc) '' - patch -p1 -d compiler-rt -i ${sigaltstackPatch} - patch -p1 -d compiler-rt -i ${./patches/sigaltstack.patch} - patch -p1 -d llbuild -i ${sigunusedPatch} - patch -p1 -i ${./patches/sigunused.patch} + --replace \"usr\" \"$PREFIX\" \ + --replace usr/lib "$PREFIX/lib" ''; doCheck = false; @@ -305,7 +286,8 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ dtzWill ]; license = licenses.asl20; # Swift doesn't support 32bit Linux, unknown on other platforms. - platforms = [ "x86_64-linux" ]; + platforms = platforms.linux; + badPlatforms = platforms.i686; }; } diff --git a/pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch b/pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch deleted file mode 100644 index f647d9189dd2..000000000000 --- a/pkgs/development/compilers/swift/patches/0003-build-presets-linux-disable-tests.patch +++ /dev/null @@ -1,38 +0,0 @@ -From fcc7c216da6cd255f884b7aa39f361786e3afa6a Mon Sep 17 00:00:00 2001 -From: Will Dietz <w@wdtz.org> -Date: Tue, 28 Mar 2017 15:02:18 -0500 -Subject: [PATCH 3/4] build-presets: (linux) disable tests. - ---- - utils/build-presets.ini | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/utils/build-presets.ini b/utils/build-presets.ini -index 1095cbaab7..1739e91dc2 100644 ---- a/utils/build-presets.ini -+++ b/utils/build-presets.ini -@@ -700,7 +700,7 @@ build-swift-stdlib-unittest-extra - - # Executes the lit tests for the installable package that is created - # Assumes the swift-integration-tests repo is checked out --test-installable-package -+# test-installable-package - - # Path to the root of the installation filesystem. - install-destdir=%(install_destdir)s -@@ -713,9 +713,9 @@ mixin-preset=mixin_linux_installation - build-subdir=buildbot_linux - lldb - release --test --validation-test --long-test -+#test -+#validation-test -+#long-test - foundation - libdispatch - lit-args=-v --- -2.12.2 - diff --git a/pkgs/development/compilers/swift/patches/icu59.patch b/pkgs/development/compilers/swift/patches/icu59.patch deleted file mode 100644 index 26337814cafa..000000000000 --- a/pkgs/development/compilers/swift/patches/icu59.patch +++ /dev/null @@ -1,113 +0,0 @@ ---- a/stdlib/public/stubs/UnicodeNormalization.cpp -+++ b/stdlib/public/stubs/UnicodeNormalization.cpp -@@ -86,11 +86,8 @@ ASCIICollation() { - for (unsigned char c = 0; c < 128; ++c) { - UErrorCode ErrorCode = U_ZERO_ERROR; - intptr_t NumCollationElts = 0; --#if defined(__CYGWIN__) || defined(_MSC_VER) - UChar Buffer[1]; --#else -- uint16_t Buffer[1]; --#endif -+ - Buffer[0] = c; - - UCollationElements *CollationIterator = -@@ -127,18 +124,9 @@ swift::_swift_stdlib_unicode_compare_utf16_utf16(const uint16_t *LeftString, - int32_t LeftLength, - const uint16_t *RightString, - int32_t RightLength) { --#if defined(__CYGWIN__) || defined(_MSC_VER) -- // ICU UChar type is platform dependent. In Cygwin, it is defined -- // as wchar_t which size is 2. It seems that the underlying binary -- // representation is same with swift utf16 representation. - return ucol_strcoll(GetRootCollator(), - reinterpret_cast<const UChar *>(LeftString), LeftLength, - reinterpret_cast<const UChar *>(RightString), RightLength); --#else -- return ucol_strcoll(GetRootCollator(), -- LeftString, LeftLength, -- RightString, RightLength); --#endif - } - - /// Compares the strings via the Unicode Collation Algorithm on the root locale. -@@ -156,12 +144,8 @@ swift::_swift_stdlib_unicode_compare_utf8_utf16(const unsigned char *LeftString, - UErrorCode ErrorCode = U_ZERO_ERROR; - - uiter_setUTF8(&LeftIterator, reinterpret_cast<const char *>(LeftString), LeftLength); --#if defined(__CYGWIN__) || defined(_MSC_VER) - uiter_setString(&RightIterator, reinterpret_cast<const UChar *>(RightString), - RightLength); --#else -- uiter_setString(&RightIterator, RightString, RightLength); --#endif - - uint32_t Diff = ucol_strcollIter(GetRootCollator(), - &LeftIterator, &RightIterator, &ErrorCode); -@@ -199,14 +183,10 @@ swift::_swift_stdlib_unicode_compare_utf8_utf8(const unsigned char *LeftString, - void *swift::_swift_stdlib_unicodeCollationIterator_create( - const __swift_uint16_t *Str, __swift_uint32_t Length) { - UErrorCode ErrorCode = U_ZERO_ERROR; --#if defined(__CYGWIN__) || defined(_MSC_VER) - UCollationElements *CollationIterator = ucol_openElements( - GetRootCollator(), reinterpret_cast<const UChar *>(Str), Length, - &ErrorCode); --#else -- UCollationElements *CollationIterator = ucol_openElements( -- GetRootCollator(), Str, Length, &ErrorCode); --#endif -+ - if (U_FAILURE(ErrorCode)) { - swift::crash("_swift_stdlib_unicodeCollationIterator_create: ucol_openElements() failed."); - } -@@ -244,17 +224,12 @@ swift::_swift_stdlib_unicode_strToUpper(uint16_t *Destination, - const uint16_t *Source, - int32_t SourceLength) { - UErrorCode ErrorCode = U_ZERO_ERROR; --#if defined(__CYGWIN__) || defined(_MSC_VER) - uint32_t OutputLength = u_strToUpper(reinterpret_cast<UChar *>(Destination), - DestinationCapacity, - reinterpret_cast<const UChar *>(Source), - SourceLength, - "", &ErrorCode); --#else -- uint32_t OutputLength = u_strToUpper(Destination, DestinationCapacity, -- Source, SourceLength, -- "", &ErrorCode); --#endif -+ - if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) { - swift::crash("u_strToUpper: Unexpected error uppercasing unicode string."); - } -@@ -271,17 +246,12 @@ swift::_swift_stdlib_unicode_strToLower(uint16_t *Destination, - const uint16_t *Source, - int32_t SourceLength) { - UErrorCode ErrorCode = U_ZERO_ERROR; --#if defined(__CYGWIN__) || defined(_MSC_VER) - uint32_t OutputLength = u_strToLower(reinterpret_cast<UChar *>(Destination), - DestinationCapacity, - reinterpret_cast<const UChar *>(Source), - SourceLength, - "", &ErrorCode); --#else -- uint32_t OutputLength = u_strToLower(Destination, DestinationCapacity, -- Source, SourceLength, -- "", &ErrorCode); --#endif -+ - if (U_FAILURE(ErrorCode) && ErrorCode != U_BUFFER_OVERFLOW_ERROR) { - swift::crash("u_strToLower: Unexpected error lowercasing unicode string."); - } -@@ -300,9 +300,9 @@ - - swift::__swift_stdlib_UBreakIterator *swift::__swift_stdlib_ubrk_open( - swift::__swift_stdlib_UBreakIteratorType type, const char *locale, -- const UChar *text, int32_t textLength, __swift_stdlib_UErrorCode *status) { -+ const __swift_stdlib_UChar * text, __swift_int32_t textLength, __swift_stdlib_UErrorCode *status) { - return ptr_cast<swift::__swift_stdlib_UBreakIterator>( -- ubrk_open(static_cast<UBreakIteratorType>(type), locale, text, textLength, -+ ubrk_open(static_cast<UBreakIteratorType>(type), locale, reinterpret_cast<const UChar *>(text), textLength, - ptr_cast<UErrorCode>(status))); - } - diff --git a/pkgs/development/compilers/swift/patches/remove_xlocale.patch b/pkgs/development/compilers/swift/patches/remove_xlocale.patch deleted file mode 100644 index 8ef7e3916962..000000000000 --- a/pkgs/development/compilers/swift/patches/remove_xlocale.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- a/swift/stdlib/public/SDK/os/os_trace_blob.c -+++ b/swift/stdlib/public/SDK/os/os_trace_blob.c -@@ -14,7 +14,6 @@ - #include <dispatch/dispatch.h> - #include <os/base.h> - #include <os/log.h> --#include <xlocale.h> - #include "os_trace_blob.h" - - OS_NOINLINE - ---- a/swift/stdlib/public/stubs/Stubs.cpp -+++ b/swift/stdlib/public/stubs/Stubs.cpp -@@ -61,7 +61,6 @@ - #define strtof_l swift_strtof_l - #define strtold_l swift_strtold_l - #else --#include <xlocale.h> - #endif - #include <limits> - #include "llvm/ADT/StringExtras.h" - ---- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h -+++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringDefaultEncoding.h -@@ -20,7 +20,6 @@ - #include <unistd.h> - #include <string.h> - #include <stdio.h> --#include <xlocale.h> - - CF_EXTERN_C_BEGIN - - ---- a/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c -+++ b/swift-corelibs-foundation/CoreFoundation/String.subproj/CFStringEncodings.c -@@ -24,7 +24,6 @@ - #include <unistd.h> - #include <string.h> - #include <stdio.h> --#include <xlocale.h> - #include <CoreFoundation/CFStringDefaultEncoding.h> - #endif - - ---- a/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h -+++ b/swift-corelibs-foundation/CoreFoundation/Base.subproj/CFInternal.h -@@ -95,7 +95,6 @@ - #if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI || DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_FREEBSD - #if TARGET_OS_CYGWIN - #else --#include <xlocale.h> - #endif - #include <unistd.h> - #include <sys/time.h> diff --git a/pkgs/development/compilers/swift/patches/sigaltstack.patch b/pkgs/development/compilers/swift/patches/sigaltstack.patch deleted file mode 100644 index c529fa3777b3..000000000000 --- a/pkgs/development/compilers/swift/patches/sigaltstack.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/lib/esan/esan_sideline_linux.cpp -+++ b/lib/esan/esan_sideline_linux.cpp -@@ -70,7 +70,7 @@ int SidelineThread::runSideline(void *Arg) { - - // Set up a signal handler on an alternate stack for safety. - InternalScopedBuffer<char> StackMap(SigAltStackSize); -- struct sigaltstack SigAltStack; -+ stack_t SigAltStack; - SigAltStack.ss_sp = StackMap.data(); - SigAltStack.ss_size = SigAltStackSize; - SigAltStack.ss_flags = 0; diff --git a/pkgs/development/compilers/swift/patches/sigunused.patch b/pkgs/development/compilers/swift/patches/sigunused.patch deleted file mode 100644 index 2701d1a3ae25..000000000000 --- a/pkgs/development/compilers/swift/patches/sigunused.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/swiftpm/Sources/Basic/Process.swift -+++ b/swiftpm/Sources/Basic/Process.swift -@@ -258,7 +258,7 @@ public func launch() throws { - // modify, so we have to take care about the set we use. - var mostSignals = sigset_t() - sigemptyset(&mostSignals) -- for i in 1 ..< SIGUNUSED { -+ for i in 1 ..< SIGSYS { - if i == SIGKILL || i == SIGSTOP { - continue - } diff --git a/pkgs/development/compilers/swift/purity.patch b/pkgs/development/compilers/swift/purity.patch index f5fb4c73af47..b30d0d0b5d5b 100644 --- a/pkgs/development/compilers/swift/purity.patch +++ b/pkgs/development/compilers/swift/purity.patch @@ -1,6 +1,17 @@ ---- a/lib/Driver/Tools.cpp 2016-08-25 15:48:05.187553443 +0200 -+++ b/lib/Driver/Tools.cpp 2016-08-25 15:48:47.534468882 +0200 -@@ -9420,13 +9420,6 @@ +From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001 +From: Will Dietz <w@wdtz.org> +Date: Thu, 18 May 2017 11:56:12 -0500 +Subject: [PATCH] "purity" patch for 5.0 + +--- + lib/Driver/ToolChains/Gnu.cpp | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp +index fe3c0191bb..c6a482bece 100644 +--- a/lib/Driver/ToolChains/Gnu.cpp ++++ b/lib/Driver/ToolChains/Gnu.cpp +@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (!Args.hasArg(options::OPT_static)) { if (Args.hasArg(options::OPT_rdynamic)) CmdArgs.push_back("-export-dynamic"); @@ -14,3 +25,6 @@ } CmdArgs.push_back("-o"); +-- +2.11.0 + diff --git a/pkgs/development/compilers/zulu/8.nix b/pkgs/development/compilers/zulu/8.nix index 23ae8ba06bb5..fb1798ab819c 100644 --- a/pkgs/development/compilers/zulu/8.nix +++ b/pkgs/development/compilers/zulu/8.nix @@ -4,11 +4,11 @@ , swingSupport ? true }: let - version = "8.21.0.1"; - openjdk = "8.0.131"; + version = "8.28.0.1"; + openjdk = "8.0.163"; - sha256_linux = "0cr1wvk1ifdq69ia8sr6171yzciba8l5x7dszwa5g2v0vmmqq88p"; - sha256_darwin = "0xq9bdzbdq8wq48gj6j56bw30l2iafz6sy1wdhrf92n9bnz5qmw7"; + sha256_linux = "1z8s3a948nvv92wybnhkyr27ipibcy45k0zv5h5gp37ynd91df45"; + sha256_darwin = "0i0prjijsgg0yyycplpp9rlfl428126rqz7bb31pchrhi6jhk699"; platform = if stdenv.isDarwin then "macosx" else "linux"; hash = if stdenv.isDarwin then sha256_darwin else sha256_linux; |