diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2018-04-04 19:36:39 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2018-04-04 19:36:39 +0200 |
commit | 23741692fabcdfee9a8b7f89576236a69d4d4d8a (patch) | |
tree | b3d53e3f97547c93bba340176bee375cb720ebdc /pkgs/development/compilers | |
parent | d051989efa7354384271bb21c5f471cfc05c1541 (diff) | |
parent | b9484875bcc1918945d373e0ea46ffff938adb05 (diff) | |
download | nixlib-23741692fabcdfee9a8b7f89576236a69d4d4d8a.tar nixlib-23741692fabcdfee9a8b7f89576236a69d4d4d8a.tar.gz nixlib-23741692fabcdfee9a8b7f89576236a69d4d4d8a.tar.bz2 nixlib-23741692fabcdfee9a8b7f89576236a69d4d4d8a.tar.lz nixlib-23741692fabcdfee9a8b7f89576236a69d4d4d8a.tar.xz nixlib-23741692fabcdfee9a8b7f89576236a69d4d4d8a.tar.zst nixlib-23741692fabcdfee9a8b7f89576236a69d4d4d8a.zip |
Merge master into staging
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/gambit/build.nix | 70 | ||||
-rw-r--r-- | pkgs/development/compilers/gambit/default.nix | 72 | ||||
-rw-r--r-- | pkgs/development/compilers/gambit/unstable.nix | 11 | ||||
-rw-r--r-- | pkgs/development/compilers/gerbil/build.nix | 88 | ||||
-rw-r--r-- | pkgs/development/compilers/gerbil/default.nix | 94 | ||||
-rw-r--r-- | pkgs/development/compilers/gerbil/unstable.nix | 12 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.4.2.nix | 193 | ||||
-rw-r--r-- | pkgs/development/compilers/ghcjs/default.nix | 1 | ||||
-rw-r--r-- | pkgs/development/compilers/glslang/default.nix | 24 | ||||
-rw-r--r-- | pkgs/development/compilers/icedtea-web/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/compilers/openjdk/10.nix | 7 |
11 files changed, 407 insertions, 169 deletions
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 83e02b14708d..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.unix; - 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 555dbbfe460e..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.unix; - 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/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/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/openjdk/10.nix b/pkgs/development/compilers/openjdk/10.nix index 545a333029d7..bc7eafb92215 100644 --- a/pkgs/development/compilers/openjdk/10.nix +++ b/pkgs/development/compilers/openjdk/10.nix @@ -135,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 |