summaryrefslogtreecommitdiff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/ats2/default.nix44
-rw-r--r--pkgs/development/compilers/ats2/installed-lib-directory-version.patch99
-rw-r--r--pkgs/development/compilers/ats2/setup-contrib-hook.sh1
-rw-r--r--pkgs/development/compilers/coreclr/default.nix74
-rw-r--r--pkgs/development/compilers/edk2/default.nix7
-rw-r--r--pkgs/development/compilers/gcc/4.5/default.nix38
-rw-r--r--pkgs/development/compilers/gcc/4.6/builder.sh262
-rw-r--r--pkgs/development/compilers/gcc/4.6/default.nix530
-rw-r--r--pkgs/development/compilers/gcc/4.6/ghdl-ortho-cflags.patch111
-rw-r--r--pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch14
-rw-r--r--pkgs/development/compilers/gcc/4.6/no-sys-dirs.patch54
-rw-r--r--pkgs/development/compilers/gcc/4.6/sources.nix27
-rw-r--r--pkgs/development/compilers/gcc/4.8/default.nix51
-rw-r--r--pkgs/development/compilers/gcc/4.9/default.nix45
-rw-r--r--pkgs/development/compilers/gcc/5/default.nix51
-rw-r--r--pkgs/development/compilers/gcc/6/default.nix51
-rw-r--r--pkgs/development/compilers/gcc/builder.sh21
-rw-r--r--pkgs/development/compilers/ghc/head.nix6
-rw-r--r--pkgs/development/compilers/glslang/default.nix25
-rw-r--r--pkgs/development/compilers/glslang/install-headers.patch26
-rw-r--r--pkgs/development/compilers/go/1.7.nix2
-rw-r--r--pkgs/development/compilers/hhvm/default.nix2
-rw-r--r--pkgs/development/compilers/jhc/default.nix5
-rw-r--r--pkgs/development/compilers/kotlin/default.nix4
-rw-r--r--pkgs/development/compilers/llvm/3.4/clang.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.4/lld.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.4/lldb.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.4/polly.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.5/clang.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.5/libc++/default.nix13
-rw-r--r--pkgs/development/compilers/llvm/3.5/lld.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.5/lldb.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.5/polly.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.6/clang/default.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.6/libc++/default.nix13
-rw-r--r--pkgs/development/compilers/llvm/3.6/lldb.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.7/clang/default.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.7/default.nix13
-rw-r--r--pkgs/development/compilers/llvm/3.7/libc++/default.nix11
-rw-r--r--pkgs/development/compilers/llvm/3.7/lldb.nix5
-rw-r--r--pkgs/development/compilers/llvm/3.7/llvm.nix16
-rw-r--r--pkgs/development/compilers/llvm/3.8/clang/default.nix14
-rw-r--r--pkgs/development/compilers/llvm/3.8/default.nix19
-rw-r--r--pkgs/development/compilers/llvm/3.8/libc++/default.nix13
-rw-r--r--pkgs/development/compilers/llvm/3.8/libc++abi.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.8/lldb.nix10
-rw-r--r--pkgs/development/compilers/llvm/3.8/llvm.nix2
-rw-r--r--pkgs/development/compilers/llvm/3.9/clang/default.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.9/default.nix13
-rw-r--r--pkgs/development/compilers/llvm/3.9/libc++/default.nix3
-rw-r--r--pkgs/development/compilers/llvm/3.9/lldb.nix1
-rw-r--r--pkgs/development/compilers/llvm/3.9/llvm-outputs.patch26
-rw-r--r--pkgs/development/compilers/llvm/3.9/llvm.nix39
-rwxr-xr-xpkgs/development/compilers/manticore/builder.sh2
-rw-r--r--pkgs/development/compilers/mezzo/default.nix4
-rw-r--r--pkgs/development/compilers/mono/llvm.nix1
-rw-r--r--pkgs/development/compilers/nim/default.nix4
-rw-r--r--pkgs/development/compilers/obliv-c/default.nix33
-rw-r--r--pkgs/development/compilers/opa/default.nix3
-rw-r--r--pkgs/development/compilers/openjdk/8.nix70
-rw-r--r--pkgs/development/compilers/openjdk/swing-use-gtk.patch26
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix6
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix6
-rw-r--r--pkgs/development/compilers/pakcs/adjust-buildsystem.patch21
-rw-r--r--pkgs/development/compilers/pakcs/case-insensitive.patch19
-rw-r--r--pkgs/development/compilers/pakcs/default.nix159
-rw-r--r--pkgs/development/compilers/ponyc/default.nix67
-rw-r--r--pkgs/development/compilers/ponyc/disable-tests.patch21
-rw-r--r--pkgs/development/compilers/ponyc/pony-stable.nix26
-rw-r--r--pkgs/development/compilers/rust/bootstrap.nix10
-rw-r--r--pkgs/development/compilers/rust/default.nix14
-rw-r--r--pkgs/development/compilers/rust/rustc.nix18
-rw-r--r--pkgs/development/compilers/scala/default.nix4
-rw-r--r--pkgs/development/compilers/shaderc/default.nix31
-rw-r--r--pkgs/development/compilers/solc/default.nix8
-rw-r--r--pkgs/development/compilers/swi-prolog/default.nix19
-rw-r--r--pkgs/development/compilers/vala/0.23.nix30
-rw-r--r--pkgs/development/compilers/vala/0.26.nix30
-rw-r--r--pkgs/development/compilers/vala/0.28.nix30
-rw-r--r--pkgs/development/compilers/vala/0.32.nix31
-rw-r--r--pkgs/development/compilers/vala/default.nix61
81 files changed, 1099 insertions, 1430 deletions
diff --git a/pkgs/development/compilers/ats2/default.nix b/pkgs/development/compilers/ats2/default.nix
index 51b3cf11823f..d8dabaac779b 100644
--- a/pkgs/development/compilers/ats2/default.nix
+++ b/pkgs/development/compilers/ats2/default.nix
@@ -1,17 +1,53 @@
-{ stdenv, fetchurl, gmp }:
+{ stdenv, fetchurl, gmp
+, withEmacsSupport ? true
+, withContrib ? true }:
+
+let
+ versionPkg = "0.2.11" ;
+
+ contrib = fetchurl {
+ url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-contrib-${versionPkg}.tgz" ;
+ sha256 = "0kc4nx1904745c1rkj9yfbayidw7rks1mwq0lxmvsgghn98dxwjn" ;
+ };
+
+ postInstallContrib = stdenv.lib.optionalString withContrib
+ ''
+ local contribDir=$out/lib/ats2-postiats-*/ ;
+ mkdir -p $contribDir ;
+ tar -xzf "${contrib}" --strip-components 1 -C $contribDir ;
+ '';
+
+ postInstallEmacs = stdenv.lib.optionalString withEmacsSupport
+ ''
+ local siteLispDir=$out/share/emacs/site-lisp/ats2 ;
+ mkdir -p $siteLispDir ;
+ install -m 0644 -v ./utils/emacs/*.el $siteLispDir ;
+ '';
+in
stdenv.mkDerivation rec {
name = "ats2-${version}";
- version = "0.2.7";
+ version = versionPkg;
src = fetchurl {
url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-${version}.tgz";
- sha256 = "1w9cncahv0vkqsj4vlfnn7bn61jvgxgjhk7wbppcm3yhb48pkmda";
+ sha256 = "140xy129fr11bdf4bj6qya9mf0fhnv2x7ksb9j46pf2yzrsrks8g";
};
buildInputs = [ gmp ];
- setupHook = ./setup-hook.sh;
+ setupHook = with stdenv.lib;
+ let
+ hookFiles =
+ [ ./setup-hook.sh ]
+ ++ optional withContrib ./setup-contrib-hook.sh;
+ in
+ builtins.toFile "setupHook.sh"
+ (concatMapStringsSep "\n" builtins.readFile hookFiles);
+
+ patches = [ ./installed-lib-directory-version.patch ];
+
+ postInstall = postInstallContrib + postInstallEmacs;
meta = with stdenv.lib; {
description = "Functional programming language with dependent types";
diff --git a/pkgs/development/compilers/ats2/installed-lib-directory-version.patch b/pkgs/development/compilers/ats2/installed-lib-directory-version.patch
new file mode 100644
index 000000000000..d9e5ad2d21e7
--- /dev/null
+++ b/pkgs/development/compilers/ats2/installed-lib-directory-version.patch
@@ -0,0 +1,99 @@
+Change the name of the library directory to match the version of the package.
+
+diff -Naur ATS2-Postiats-0.2.11/configure postiats-new/configure
+--- ATS2-Postiats-0.2.11/configure 2016-10-13 12:03:20.000000000 -0400
++++ postiats-new/configure 2016-10-23 20:17:29.912579618 -0400
+@@ -1,6 +1,6 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.69 for ATS2/Postiats 0.2.10.
++# Generated by GNU Autoconf 2.69 for ATS2/Postiats 0.2.11.
+ #
+ # Report bugs to <gmpostiats@gmail.com>.
+ #
+@@ -580,8 +580,8 @@
+ # Identity of this package.
+ PACKAGE_NAME='ATS2/Postiats'
+ PACKAGE_TARNAME='ats2-postiats'
+-PACKAGE_VERSION='0.2.10'
+-PACKAGE_STRING='ATS2/Postiats 0.2.10'
++PACKAGE_VERSION='0.2.11'
++PACKAGE_STRING='ATS2/Postiats 0.2.11'
+ PACKAGE_BUGREPORT='gmpostiats@gmail.com'
+ PACKAGE_URL=''
+
+@@ -1242,7 +1242,7 @@
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+-\`configure' configures ATS2/Postiats 0.2.10 to adapt to many kinds of systems.
++\`configure' configures ATS2/Postiats 0.2.11 to adapt to many kinds of systems.
+
+ Usage: $0 [OPTION]... [VAR=VALUE]...
+
+@@ -1304,7 +1304,7 @@
+
+ if test -n "$ac_init_help"; then
+ case $ac_init_help in
+- short | recursive ) echo "Configuration of ATS2/Postiats 0.2.10:";;
++ short | recursive ) echo "Configuration of ATS2/Postiats 0.2.11:";;
+ esac
+ cat <<\_ACEOF
+
+@@ -1384,7 +1384,7 @@
+ test -n "$ac_init_help" && exit $ac_status
+ if $ac_init_version; then
+ cat <<\_ACEOF
+-ATS2/Postiats configure 0.2.10
++ATS2/Postiats configure 0.2.11
+ generated by GNU Autoconf 2.69
+
+ Copyright (C) 2012 Free Software Foundation, Inc.
+@@ -1936,7 +1936,7 @@
+ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+
+-It was created by ATS2/Postiats $as_me 0.2.10, which was
++It was created by ATS2/Postiats $as_me 0.2.11, which was
+ generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+@@ -4226,7 +4226,7 @@
+ # report actual input values of CONFIG_FILES etc. instead of their
+ # values after options handling.
+ ac_log="
+-This file was extended by ATS2/Postiats $as_me 0.2.10, which was
++This file was extended by ATS2/Postiats $as_me 0.2.11, which was
+ generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+@@ -4288,7 +4288,7 @@
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+-ATS2/Postiats config.status 0.2.10
++ATS2/Postiats config.status 0.2.11
+ configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+diff -Naur ATS2-Postiats-0.2.11/src/CBOOT/config.h postiats-new/src/CBOOT/config.h
+--- ATS2-Postiats-0.2.11/src/CBOOT/config.h 2016-10-13 12:03:20.000000000 -0400
++++ postiats-new/src/CBOOT/config.h 2016-10-23 20:16:34.613836556 -0400
+@@ -44,7 +44,7 @@
+ #define PACKAGE_NAME "ATS2/Postiats"
+
+ /* Define to the full name and version of this package. */
+-#define PACKAGE_STRING "ATS2/Postiats 0.2.10"
++#define PACKAGE_STRING "ATS2/Postiats 0.2.11"
+
+ /* Define to the one symbol short name of this package. */
+ #define PACKAGE_TARNAME "ats2-postiats"
+@@ -53,7 +53,7 @@
+ #define PACKAGE_URL ""
+
+ /* Define to the version of this package. */
+-#define PACKAGE_VERSION "0.2.10"
++#define PACKAGE_VERSION "0.2.11"
+
+ /* The size of `void*', as computed by sizeof. */
+ #define SIZEOF_VOIDP 8
diff --git a/pkgs/development/compilers/ats2/setup-contrib-hook.sh b/pkgs/development/compilers/ats2/setup-contrib-hook.sh
new file mode 100644
index 000000000000..8c5e123b61c4
--- /dev/null
+++ b/pkgs/development/compilers/ats2/setup-contrib-hook.sh
@@ -0,0 +1 @@
+export PATSHOMERELOC=@out@/lib/ats2-postiats-@version@
diff --git a/pkgs/development/compilers/coreclr/default.nix b/pkgs/development/compilers/coreclr/default.nix
index cf2833c5c6cb..7799cab76a64 100644
--- a/pkgs/development/compilers/coreclr/default.nix
+++ b/pkgs/development/compilers/coreclr/default.nix
@@ -7,18 +7,24 @@
, libunwind
, gettext
, openssl
+, python2
+, icu
+, lttng-ust
+, liburcu
+, libuuid
+, ed
+, debug ? false
}:
stdenv.mkDerivation rec {
name = "coreclr-${version}";
- version = "git-" + (builtins.substring 0 10 rev);
- rev = "8c70800b5e8dc5535c379dec4a6fb32f7ab5e878";
+ version = "1.0.4";
src = fetchFromGitHub {
- owner = "dotnet";
- repo = "coreclr";
- inherit rev;
- sha256 = "1galskbnr9kdjjxpx5qywh49400swchhq5f54i16kxyr9k4mvq1f";
+ owner = "dotnet";
+ repo = "coreclr";
+ rev = "v${version}";
+ sha256 = "1wpig71q0kh2yrq162d32x00zlwrrs1wymkgijh49cqkn4cwkh91";
};
buildInputs = [
@@ -30,33 +36,63 @@ stdenv.mkDerivation rec {
libunwind
gettext
openssl
+ python2
+ icu
+ lttng-ust
+ liburcu
+ libuuid
+ ed
];
configurePhase = ''
# Prevent clang-3.5 (rather than just clang) from being selected as the compiler as that's
# not wrapped
- substituteInPlace src/pal/tools/gen-buildsys-clang.sh --replace "which \"clang-" "which \"clang-DoNotFindThisOne"
-
- # Prevent the -nostdinc++ flag to be passed to clang, which causes a compilation error
- substituteInPlace src/CMakeLists.txt --replace "if(NOT CLR_CMAKE_PLATFORM_DARWIN)" "if(FALSE)"
+ substituteInPlace src/pal/tools/gen-buildsys-clang.sh --replace "which \"clang-\$" "which \"clang-DoNotFindThisOne\$"
patchShebangs build.sh
patchShebangs src/pal/tools/gen-buildsys-clang.sh
+
+ # See https://github.com/dotnet/coreclr/issues/7573#issuecomment-253081323
+ ed -v ./src/pal/src/include/pal/palinternal.h << EOF
+ /^#undef memcpy
+ -1
+ d
+ +1
+ d
+ w
+ EOF
'';
- buildPhase = "./build.sh";
+ BuildArch = if stdenv.is64bit then "x64" else "x86";
+ BuildType = if debug then "Debug" else "Release";
- installPhase = ''
- pushd bin/Product/Linux.x64.Debug/
- mkdir -v -p $out/bin
- cp -v coreconsole corerun crossgen $out/bin
- cp -rv lib $out
- cp -v *.so $out/lib
- cp -rv inc $out/include
- cp -rv gcinfo $out/include
+ hardeningDisable = [ "strictoverflow" "format" ];
+ NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-result" ];
+
+ buildPhase = ''
+ ./build.sh $BuildArch $BuildType
+
+ # Try to make some sensible hierarchy out of the output
+ pushd bin/Product/Linux.$BuildArch.$BuildType
+ mkdir lib2
+ mv *.so *.so.dbg lib2
+ mv bin lib3
+ mkdir lib4
+ mv Loader lib4
+ mv inc include
+ mv gcinfo include
+ mkdir bin
+ mkdir -p share/doc
+ mv sosdocsunix.txt share/doc
+ for f in * ; do test -f $f && mv -v $f bin; done
popd
'';
+ installPhase = ''
+ mkdir -p $out
+ cp -rv bin/Product/Linux.$BuildArch.$BuildType/* $out
+ '';
+
meta = {
homepage = http://dotnet.github.io/core/;
description = ".NET is a general purpose development platform";
diff --git a/pkgs/development/compilers/edk2/default.nix b/pkgs/development/compilers/edk2/default.nix
index 4ddf580fae5d..f51e3af25ee8 100644
--- a/pkgs/development/compilers/edk2/default.nix
+++ b/pkgs/development/compilers/edk2/default.nix
@@ -1,6 +1,7 @@
-{ stdenv, fetchgit, libuuid, pythonFull, iasl }:
+{ stdenv, fetchgit, libuuid, python2, iasl }:
let
+ pythonEnv = python2.withPackages(ps: [ps.tkinter]);
targetArch = if stdenv.isi686 then
"IA32"
@@ -18,7 +19,7 @@ edk2 = stdenv.mkDerivation {
sha256 = "0s9ywb8w7xzlnmm4kwzykxkrdaw53b7pky121cc9wjkllzqwyxrb";
};
- buildInputs = [ libuuid pythonFull ];
+ buildInputs = [ libuuid pythonEnv];
makeFlags = "-C BaseTools";
@@ -40,7 +41,7 @@ edk2 = stdenv.mkDerivation {
passthru = {
setup = projectDscPath: attrs: {
- buildInputs = [ pythonFull ] ++
+ buildInputs = [ pythonEnv ] ++
stdenv.lib.optionals (attrs ? buildInputs) attrs.buildInputs;
configurePhase = ''
diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix
index 5d05410a7fda..12e7e23e90b6 100644
--- a/pkgs/development/compilers/gcc/4.5/default.nix
+++ b/pkgs/development/compilers/gcc/4.5/default.nix
@@ -332,28 +332,26 @@ stdenv.mkDerivation ({
#
# Likewise, the LTO code doesn't find zlib.
- CPATH = concatStrings
- (intersperse ":" (map (x: "${x.dev or x}/include")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread
- ++ optional (libpthreadCross != null) libpthreadCross
+ CPATH = makeSearchPathOutput "dev" "include" ([]
+ ++ optional (zlib != null) zlib
+ ++ optional langJava boehmgc
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread
+ ++ optional (libpthreadCross != null) libpthreadCross
- # On GNU/Hurd glibc refers to Mach & Hurd
- # headers.
- ++ optionals (libcCross != null &&
- hasAttr "propagatedBuildInputs" libcCross)
- libcCross.propagatedBuildInputs)));
+ # On GNU/Hurd glibc refers to Mach & Hurd
+ # headers.
+ ++ optionals (libcCross != null &&
+ hasAttr "propagatedBuildInputs" libcCross)
+ libcCross.propagatedBuildInputs);
- LIBRARY_PATH = concatStrings
- (intersperse ":" (map (x: x + "/lib")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread)));
+ LIBRARY_PATH = makeLibraryPath ([]
+ ++ optional (zlib != null) zlib
+ ++ optional langJava boehmgc
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread);
EXTRA_TARGET_CFLAGS =
if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/4.6/builder.sh b/pkgs/development/compilers/gcc/4.6/builder.sh
deleted file mode 100644
index 6087bb30cfb2..000000000000
--- a/pkgs/development/compilers/gcc/4.6/builder.sh
+++ /dev/null
@@ -1,262 +0,0 @@
-source $stdenv/setup
-
-
-export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
-mkdir $NIX_FIXINC_DUMMY
-
-
-if test "$staticCompiler" = "1"; then
- EXTRA_LDFLAGS="-static"
-else
- EXTRA_LDFLAGS="-Wl,-rpath,$lib/lib"
-fi
-
-
-# GCC interprets empty paths as ".", which we don't want.
-if test -z "$CPATH"; then unset CPATH; fi
-if test -z "$LIBRARY_PATH"; then unset LIBRARY_PATH; fi
-echo "\$CPATH is \`$CPATH'"
-echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
-
-if test "$noSysDirs" = "1"; then
-
- if test -e $NIX_CC/nix-support/orig-libc; then
-
- # Figure out what extra flags to pass to the gcc compilers
- # being generated to make sure that they use our glibc.
- extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
- extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/nix-support/libc-ldflags-before)"
-
- # Use *real* header files, otherwise a limits.h is generated
- # that does not include Glibc's limits.h (notably missing
- # SSIZE_MAX, which breaks the build).
- export NIX_FIXINC_DUMMY=$libc_dev/include
-
- # The path to the Glibc binaries such as `crti.o'.
- glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
-
- else
- # Hack: support impure environments.
- extraFlags="-isystem /usr/include"
- extraLDFlags="-L/usr/lib64 -L/usr/lib"
- glibc_libdir="/usr/lib"
- export NIX_FIXINC_DUMMY=/usr/include
- fi
-
- extraFlags="-I$NIX_FIXINC_DUMMY $extraFlags"
- extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
-
- # BOOT_CFLAGS defaults to `-g -O2'; since we override it below,
- # make sure to explictly add them so that files compiled with the
- # bootstrap compiler are optimized and (optionally) contain
- # debugging information (info "(gccinstall) Building").
- if test -n "$dontStrip"; then
- extraFlags="-O2 -g $extraFlags"
- else
- # Don't pass `-g' at all; this saves space while building.
- extraFlags="-O2 $extraFlags"
- fi
-
- EXTRA_FLAGS="$extraFlags"
- for i in $extraLDFlags; do
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,$i"
- done
-
- if test -n "$targetConfig"; then
- # Cross-compiling, we need gcc not to read ./specs in order to build
- # the g++ compiler (after the specs for the cross-gcc are created).
- # Having LIBRARY_PATH= makes gcc read the specs from ., and the build
- # breaks. Having this variable comes from the default.nix code to bring
- # gcj in.
- unset LIBRARY_PATH
- unset CPATH
- if test -z "$crossStageStatic"; then
- EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter ${libcCross}/include"
- EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
- fi
- else
- if test -z "$NIX_CC_CROSS"; then
- EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
- EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
- else
- # This the case of cross-building the gcc.
- # We need special flags for the target, different than those of the build
- # Assertion:
- test -e $NIX_CC_CROSS/nix-support/orig-libc
-
- # Figure out what extra flags to pass to the gcc compilers
- # being generated to make sure that they use our glibc.
- extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
- extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
-
- # Use *real* header files, otherwise a limits.h is generated
- # that does not include Glibc's limits.h (notably missing
- # SSIZE_MAX, which breaks the build).
- NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
-
- # The path to the Glibc binaries such as `crti.o'.
- glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
-
- extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
- extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
-
- EXTRA_TARGET_CFLAGS="$extraFlags"
- for i in $extraLDFlags; do
- EXTRA_TARGET_LDFLAGS="$EXTRA_TARGET_LDFLAGS -Wl,$i"
- done
- fi
- fi
-
-
- # CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
- # the startfiles.
- # FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
- # for the startfiles.
- makeFlagsArray=( \
- "${makeFlagsArray[@]}" \
- NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
- SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
- CFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
- CFLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
- FLAGS_FOR_TARGET="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
- LDFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
- LDFLAGS_FOR_TARGET="$EXTRA_TARGET_LDFLAGS $EXTRA_TARGET_LDFLAGS" \
- )
-
- if test -z "$targetConfig"; then
- makeFlagsArray=( \
- "${makeFlagsArray[@]}" \
- BOOT_CFLAGS="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
- BOOT_LDFLAGS="$EXTRA_TARGET_CFLAGS $EXTRA_TARGET_LDFLAGS" \
- )
- fi
-
- if test -n "$targetConfig" -a "$crossStageStatic" == 1; then
- # We don't want the gcc build to assume there will be a libc providing
- # limits.h in this stagae
- makeFlagsArray=( \
- "${makeFlagsArray[@]}" \
- LIMITS_H_TEST=false \
- )
- else
- makeFlagsArray=( \
- "${makeFlagsArray[@]}" \
- LIMITS_H_TEST=true \
- )
- fi
-fi
-
-if test -n "$targetConfig"; then
- # The host strip will destroy some important details of the objects
- dontStrip=1
-fi
-
-
-preConfigure() {
- if test -n "$newlibSrc"; then
- tar xvf "$newlibSrc" -C ..
- ln -s ../newlib-*/newlib newlib
- # Patch to get armvt5el working:
- sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
- fi
- # Bug - they packaged zlib
- if test -d "zlib"; then
- # This breaks the build without-headers, which should build only
- # the target libgcc as target libraries.
- # See 'configure:5370'
- rm -Rf zlib
- fi
-
- if test -f "$NIX_CC/nix-support/orig-libc"; then
- # Patch the configure script so it finds glibc headers. It's
- # important for example in order not to get libssp built,
- # because its functionality is in glibc already.
- sed -i \
- -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \
- gcc/configure
- fi
-
- if test -n "$crossMingw" -a -n "$crossStageStatic"; then
- mkdir -p ../mingw
- # --with-build-sysroot expects that:
- cp -R $libcCross/include ../mingw
- configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
- fi
-
- # Perform the build in a different directory.
- mkdir ../build
- cd ../build
- configureScript=../$sourceRoot/configure
-}
-
-
-postConfigure() {
- # Don't store the configure flags in the resulting executables.
- sed -e '/TOPLEVEL_CONFIGURE_ARGUMENTS=/d' -i Makefile
-}
-
-
-preInstall() {
- # Make ‘lib64’ a symlink to ‘lib’.
- if [ -n "$is64bit" -a -z "$enableMultilib" ]; then
- mkdir -p $out/lib
- ln -s lib $out/lib64
- fi
-}
-
-
-postInstall() {
- # Move runtime libraries to $lib.
- mkdir -p $lib/lib
- ln -s lib $lib/lib64
- moveToOutput "lib/lib*.so" "$lib"
- moveToOutput "lib/lib*.so.*[0-9]" "$lib"
- moveToOutput "lib/*.la" "$lib"
- for i in $lib/lib/*.la; do
- substituteInPlace $i --replace $out $lib
- done
-
- # Remove precompiled headers for now. They are very big and
- # probably not very useful yet.
- find $out/include -name "*.gch" -exec rm -rf {} \; -prune
-
- # Remove `fixincl' to prevent a retained dependency on the
- # previous gcc.
- rm -rf $out/libexec/gcc/*/*/install-tools
- rm -rf $out/lib/gcc/*/*/install-tools
-
- # More dependencies with the previous gcc or some libs (gccbug stores the build command line)
- rm -rf $out/bin/gccbug
-
- # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
- for i in $out/libexec/gcc/*/*/*; do
- if PREV_RPATH=`patchelf --print-rpath $i`; then
- patchelf --set-rpath `echo $PREV_RPATH | sed 's,:[^:]*bootstrap-tools/lib,,'` $i
- fi
- done
-
- # Get rid of some "fixed" header files
- rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux}
-
- # Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
- for i in $out/bin/*-gcc*; do
- if cmp -s $out/bin/gcc $i; then
- ln -sfn gcc $i
- fi
- done
-
- for i in $out/bin/c++ $out/bin/*-c++* $out/bin/*-g++*; do
- if cmp -s $out/bin/g++ $i; then
- ln -sfn g++ $i
- fi
- done
-
- # Disable RANDMMAP on grsec, which causes segfaults when using
- # precompiled headers.
- # See https://bugs.gentoo.org/show_bug.cgi?id=301299#c31
- paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus}
-
- eval "$postInstallGhdl"
-}
-
-genericBuild
diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix
deleted file mode 100644
index 991d4fc883fb..000000000000
--- a/pkgs/development/compilers/gcc/4.6/default.nix
+++ /dev/null
@@ -1,530 +0,0 @@
-{ stdenv, fetchurl, noSysDirs
-, langC ? true, langCC ? true, langFortran ? false
-, langJava ? false
-, langAda ? false
-, langVhdl ? false
-, langGo ? false
-, profiledCompiler ? false
-, staticCompiler ? false
-, enableShared ? true
-, texinfo ? null
-, perl ? null # optional, for texi2pod (then pod2man); required for Java
-, gmp, mpfr, libmpc, gettext, which
-, libelf # optional, for link-time optimizations (LTO)
-, ppl ? null, cloog ? null # optional, for the Graphite optimization framework.
-, zlib ? null, boehmgc ? null
-, zip ? null, unzip ? null, pkgconfig ? null, gtk2 ? null, libart_lgpl ? null
-, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
-, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
-, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
-, gnatboot ? null
-, enableMultilib ? false
-, enablePlugin ? true # whether to support user-supplied plug-ins
-, name ? "gcc"
-, cross ? null
-, binutilsCross ? null
-, libcCross ? null
-, crossStageStatic ? true
-, gnat ? null
-, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
-, stripped ? true
-, gnused ? null
-}:
-
-assert langJava -> zip != null && unzip != null
- && zlib != null && boehmgc != null
- && perl != null; # for `--enable-java-home'
-assert langAda -> gnatboot != null;
-assert langVhdl -> gnat != null;
-
-# LTO needs libelf and zlib.
-assert libelf != null -> zlib != null;
-
-# Make sure we get GNU sed.
-assert stdenv.isDarwin -> gnused != null;
-
-with stdenv.lib;
-with builtins;
-
-let version = "4.6.4";
-
- # Whether building a cross-compiler for GNU/Hurd.
- crossGNU = cross != null && cross.config == "i586-pc-gnu";
-
- patches = [ ]
- ++ optional (cross != null) ../libstdc++-target.patch
- ++ optional noSysDirs ./no-sys-dirs.patch
- # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
- # target libraries and tools.
- ++ optional langAda ../gnat-cflags.patch
- ++ optional langVhdl ./ghdl-ortho-cflags.patch
- ++ optional langFortran ../gfortran-driving.patch
- ++ optional (stdenv.isGNU || crossGNU) ./hurd-sigrtmin.patch;
-
- javaEcj = fetchurl {
- # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
- # `configure' time.
-
- # XXX: Eventually we might want to take it from upstream.
- url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
- sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
- };
-
- # Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
- # binary distribution here to allow the whole chain to be bootstrapped.
- javaAntlr = fetchurl {
- url = http://www.antlr.org/download/antlr-3.1.3.jar;
- sha256 = "1f41j0y4kjydl71lqlvr73yagrs2jsg1fjymzjz66mjy7al5lh09";
- };
-
- xlibs = [
- libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
- xproto renderproto xextproto inputproto randrproto
- ];
-
- javaAwtGtk = langJava && gtk2 != null;
-
- /* Platform flags */
- platformFlags = let
- gccArch = stdenv.lib.attrByPath [ "platform" "gcc" "arch" ] null stdenv;
- gccCpu = stdenv.lib.attrByPath [ "platform" "gcc" "cpu" ] null stdenv;
- gccAbi = stdenv.lib.attrByPath [ "platform" "gcc" "abi" ] null stdenv;
- gccFpu = stdenv.lib.attrByPath [ "platform" "gcc" "fpu" ] null stdenv;
- gccFloat = stdenv.lib.attrByPath [ "platform" "gcc" "float" ] null stdenv;
- withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
- withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
- withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
- withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
- withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
- in
- (withArch +
- withCpu +
- withAbi +
- withFpu +
- withFloat);
-
- /* Cross-gcc settings */
- crossMingw = (cross != null && cross.libc == "msvcrt");
- crossConfigureFlags = let
- gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
- gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
- gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
- gccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] null cross;
- withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
- withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
- withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
- withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
- in
- "--target=${cross.config}" +
- withArch +
- withCpu +
- withAbi +
- withFpu +
- (if crossMingw && crossStageStatic then
- " --with-headers=${libcCross}/include" +
- " --with-gcc" +
- " --with-gnu-as" +
- " --with-gnu-ld" +
- " --with-gnu-ld" +
- " --disable-shared" +
- " --disable-nls" +
- " --disable-debug" +
- " --enable-sjlj-exceptions" +
- " --enable-threads=win32" +
- " --disable-win32-registry"
- else if crossStageStatic then
- " --disable-libssp --disable-nls" +
- " --without-headers" +
- " --disable-threads " +
- " --disable-libmudflap " +
- " --disable-libgomp " +
- " --disable-libquadmath" +
- " --disable-shared" +
- " --disable-decimal-float" # libdecnumber requires libc
- else
- " --with-headers=${libcCross}/include" +
- " --enable-__cxa_atexit" +
- " --enable-long-long" +
- (if crossMingw then
- " --enable-threads=win32" +
- " --enable-sjlj-exceptions" +
- " --enable-hash-synchronization" +
- " --disable-libssp" +
- " --disable-nls" +
- " --with-dwarf2" +
- # I think noone uses shared gcc libs in mingw, so we better do the same.
- # In any case, mingw32 g++ linking is broken by default with shared libs,
- # unless adding "-lsupc++" to any linking command. I don't know why.
- " --disable-shared" +
- # To keep ABI compatibility with upstream mingw-w64
- " --enable-fully-dynamic-string"
- else (if cross.libc == "uclibc" then
- # In uclibc cases, libgomp needs an additional '-ldl'
- # and as I don't know how to pass it, I disable libgomp.
- " --disable-libgomp" else "") +
- " --enable-threads=posix" +
- " --enable-nls" +
- " --disable-decimal-float") # No final libdecnumber (it may work only in 386)
- );
- stageNameAddon = if crossStageStatic then "-stage-static" else
- "-stage-final";
- crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
-
- bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips && !stdenv.isDarwin;
-
-in
-
-# We need all these X libraries when building AWT with GTK+.
-assert gtk2 != null -> (filter (x: x == null) xlibs) == [];
-
-stdenv.mkDerivation ({
- name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
-
- builder = ./builder.sh;
-
- srcs = (import ./sources.nix) {
- inherit fetchurl optional version;
- inherit langC langCC langFortran langJava langAda langGo;
- };
-
- outputs = [ "out" "lib" ];
-
- setOutputFlags = false;
-
- inherit patches enableMultilib;
-
- hardeningDisable = [ "format" ];
-
- libc_dev = stdenv.cc.libc_dev;
-
- postPatch =
- if (stdenv.isGNU
- || (libcCross != null # e.g., building `gcc.crossDrv'
- && libcCross ? crossConfig
- && libcCross.crossConfig == "i586-pc-gnu")
- || (crossGNU && libcCross != null))
- then
- # On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not
- # in glibc, so add the right `-I' flags to the default spec string.
- assert libcCross != null -> libpthreadCross != null;
- let
- libc = if libcCross != null then libcCross else stdenv.glibc;
- gnu_h = "gcc/config/gnu.h";
- i386_gnu_h = "gcc/config/i386/gnu.h";
- extraCPPDeps =
- libc.propagatedBuildInputs
- ++ stdenv.lib.optional (libpthreadCross != null) libpthreadCross
- ++ stdenv.lib.optional (libpthread != null) libpthread;
- extraCPPSpec =
- concatStrings (intersperse " "
- (map (x: "-I${x.dev or x}/include") extraCPPDeps));
- extraLibSpec =
- if libpthreadCross != null
- then "-L${libpthreadCross}/lib ${libpthreadCross.TARGET_LDFLAGS}"
- else "-L${libpthread}/lib";
- in
- '' echo "augmenting \`CPP_SPEC' in \`${i386_gnu_h}' with \`${extraCPPSpec}'..."
- sed -i "${i386_gnu_h}" \
- -es'|CPP_SPEC *"\(.*\)$|CPP_SPEC "${extraCPPSpec} \1|g'
-
- echo "augmenting \`LIB_SPEC' in \`${gnu_h}' with \`${extraLibSpec}'..."
- sed -i "${gnu_h}" \
- -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
-
- echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
- sed -i "${gnu_h}" \
- -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
- sed -i gcc/config/t-gnu \
- -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc.dev}/include|g'
- ''
- else if cross != null || stdenv.cc.libc != null then
- # On NixOS, use the right path to the dynamic linker instead of
- # `/lib/ld*.so'.
- let
- libc = if libcCross != null then libcCross else stdenv.cc.libc;
- in
- '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
- for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
- do
- grep -q LIBC_DYNAMIC_LINKER "$header" || continue
- echo " fixing \`$header'..."
- sed -i "$header" \
- -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
- done
- ''
- else null;
-
- inherit noSysDirs staticCompiler langJava crossStageStatic
- libcCross crossMingw;
-
- nativeBuildInputs = [ texinfo which gettext ]
- ++ (optional (perl != null) perl)
- ++ (optional javaAwtGtk pkgconfig);
-
- buildInputs = [ gmp mpfr libmpc libelf ]
- ++ (optional (ppl != null) ppl)
- ++ (optional (cloog != null) cloog)
- ++ (optional (zlib != null) zlib)
- ++ (optionals langJava [ boehmgc zip unzip ])
- ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
- ++ (optionals (cross != null) [binutilsCross])
- ++ (optionals langAda [gnatboot])
- ++ (optionals langVhdl [gnat])
-
- # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
- # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
- ++ (optional stdenv.isDarwin gnused)
- ;
-
- configureFlagsArray = stdenv.lib.optionals
- (ppl != null && ppl ? dontDisableStatic && ppl.dontDisableStatic)
- [ "--with-host-libstdcxx=-lstdc++ -lgcc_s" ];
-
- configureFlags = "
- ${if enableMultilib then "--disable-libquadmath" else "--disable-multilib"}
- ${if enableShared then "" else "--disable-shared"}
- ${if enablePlugin then "--enable-plugin" else ""}
- ${if ppl != null then "--with-ppl=${ppl}" else ""}
- ${if cloog != null then
- "--with-cloog=${cloog} --enable-cloog-backend=isl"
- else ""}
- ${if langJava then
- "--with-ecj-jar=${javaEcj} " +
-
- # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See
- # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
- "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre "
- else ""}
- ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
- ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
- --with-gmp=${gmp.dev}
- --with-mpfr=${mpfr.dev}
- --with-mpc=${libmpc}
- ${if libelf != null then "--with-libelf=${libelf}" else ""}
- --disable-libstdcxx-pch
- --without-included-gettext
- --with-system-zlib
- --enable-languages=${
- concatStrings (intersperse ","
- ( optional langC "c"
- ++ optional langCC "c++"
- ++ optional langFortran "fortran"
- ++ optional langJava "java"
- ++ optional langAda "ada"
- ++ optional langVhdl "vhdl"
- ++ optional langGo "go"
- )
- )
- }
- ${if langAda then " --enable-libada" else ""}
- ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
- ${if cross != null then crossConfigureFlags else ""}
- ${if !bootstrap then "--disable-bootstrap" else ""}
- ${if cross == null then platformFlags else ""}
- ";
-
- targetConfig = if cross != null then cross.config else null;
-
- buildFlags = if bootstrap then
- (if profiledCompiler then "profiledbootstrap" else "bootstrap")
- else "";
-
- installTargets =
- if stripped
- then "install-strip"
- else "install";
-
- crossAttrs = {
- patches = patches ++ [ ./hurd-sigrtmin.patch ];
- postPatch = "";
- AR = "${stdenv.cross.config}-ar";
- LD = "${stdenv.cross.config}-ld";
- CC = "${stdenv.cross.config}-gcc";
- CXX = "${stdenv.cross.config}-gcc";
- AR_FOR_TARGET = "${stdenv.cross.config}-ar";
- LD_FOR_TARGET = "${stdenv.cross.config}-ld";
- CC_FOR_TARGET = "${stdenv.cross.config}-gcc";
- NM_FOR_TARGET = "${stdenv.cross.config}-nm";
- CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
- # If we are making a cross compiler, cross != null
- NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
- dontStrip = true;
- configureFlags = ''
- ${if enableMultilib then "" else "--disable-multilib"}
- ${if enableShared then "" else "--disable-shared"}
- ${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
- ${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""}
- ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
- ${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
- ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
- --with-gmp=${gmp.crossDrv}
- --with-mpfr=${mpfr.crossDrv}
- --with-mpc=${libmpc.crossDrv}
- --disable-libstdcxx-pch
- --without-included-gettext
- --with-system-zlib
- --enable-languages=${
- concatStrings (intersperse ","
- ( optional langC "c"
- ++ optional langCC "c++"
- ++ optional langFortran "fortran"
- ++ optional langJava "java"
- ++ optional langAda "ada"
- ++ optional langVhdl "vhdl"
- ++ optional langGo "go"
- )
- )
- }
- ${if langAda then " --enable-libada" else ""}
- ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
- ${if cross != null then crossConfigureFlags else ""}
- --target=${stdenv.cross.config}
- '';
- buildFlags = "";
- };
-
-
- # Needed for the cross compilation to work
- AR = "ar";
- LD = "ld";
- CC = "gcc";
-
- # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
- # the library headers and binaries, regarless of the language being
- # compiled.
-
- # Note: When building the Java AWT GTK+ peer, the build system doesn't
- # honor `--with-gmp' et al., e.g., when building
- # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
- # add them to $CPATH and $LIBRARY_PATH in this case.
- #
- # Likewise, the LTO code doesn't find zlib.
-
- CPATH = concatStrings
- (intersperse ":" (map (x: "${x.dev or x}/include")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread
- ++ optional (libpthreadCross != null) libpthreadCross
-
- # On GNU/Hurd glibc refers to Mach & Hurd
- # headers.
- ++ optionals (libcCross != null &&
- hasAttr "propagatedBuildInputs" libcCross)
- libcCross.propagatedBuildInputs)));
-
- LIBRARY_PATH = concatStrings
- (intersperse ":" (map (x: x + "/lib")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread)));
-
- EXTRA_TARGET_CFLAGS =
- if cross != null && libcCross != null then [
- "-idirafter ${libcCross.dev}/include"
- ]
- ++ optionals (! crossStageStatic) [
- "-B${libcCross.out}/lib"
- ]
- else null;
-
- EXTRA_TARGET_LDFLAGS =
- if cross != null && libcCross != null then [
- "-Wl,-L${libcCross.out}/lib"
- ]
- ++ (if crossStageStatic then [
- "-B${libcCross.out}/lib"
- ] else [
- "-Wl,-rpath,${libcCross.out}/lib"
- "-Wl,-rpath-link,${libcCross.out}/lib"
- ])
- ++ optionals (libpthreadCross != null) [
- "-L${libpthreadCross}/lib"
- "-Wl,${libpthreadCross.TARGET_LDFLAGS}"
- ]
- else null;
-
- passthru = { inherit langC langCC langAda langFortran langVhdl
- langGo version; isGNU = true; };
-
- enableParallelBuilding = false;
-
- inherit (stdenv) is64bit;
-
- meta = {
- homepage = http://gcc.gnu.org/;
- license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
- description = "GNU Compiler Collection, version ${version}"
- + (if stripped then "" else " (with debugging info)");
-
- longDescription = ''
- The GNU Compiler Collection includes compiler front ends for C, C++,
- Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
- as libraries for these languages (libstdc++, libgcj, libgomp,...).
-
- GCC development is a part of the GNU Project, aiming to improve the
- compiler used in the GNU system including the GNU/Linux variant.
- '';
-
- maintainers = [
- stdenv.lib.maintainers.viric
- ];
-
- # Volunteers needed for the {Cyg,Dar}win ports of *PPL.
- # gnatboot is not available out of linux platforms, so we disable the darwin build
- # for the gnat (ada compiler).
- platforms =
- stdenv.lib.platforms.linux ++
- stdenv.lib.platforms.freebsd ++
- optionals (langAda == false) stdenv.lib.platforms.darwin;
- };
-}
-
-// optionalAttrs (cross != null && cross.libc == "msvcrt" && crossStageStatic) {
- makeFlags = [ "all-gcc" "all-target-libgcc" ];
- installTargets = "install-gcc install-target-libgcc";
-}
-
-# Strip kills static libs of other archs (hence cross != null)
-// optionalAttrs (!stripped || cross != null) { dontStrip = true; NIX_STRIP_DEBUG = 0; }
-
-// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
-
-// optionalAttrs langVhdl rec {
- name = "ghdl-0.29";
-
- ghdlSrc = fetchurl {
- url = "http://ghdl.free.fr/ghdl-0.29.tar.bz2";
- sha256 = "15mlinr1lwljwll9ampzcfcrk9bk0qpdks1kxlvb70xf9zhh2jva";
- };
-
- # Ghdl has some timestamps checks, storing file timestamps in '.cf' files.
- # As we will change the timestamps to 1970-01-01 00:00:01, we also set the
- # content of that .cf to that value. This way ghdl does not complain on
- # the installed object files from the basic libraries (ieee, ...)
- postInstallGhdl = ''
- pushd $out
- find . -name "*.cf" -exec \
- sed 's/[0-9]*\.000" /19700101000001.000" /g' -i {} \;
- popd
- '';
-
- postUnpack = ''
- tar xvf ${ghdlSrc}
- mv ghdl-*/vhdl gcc*/gcc
- rm -Rf ghdl-*
- '';
-
- meta = {
- homepage = "http://ghdl.free.fr/";
- license = stdenv.lib.licenses.gpl2Plus;
- description = "Complete VHDL simulator, using the GCC technology (gcc ${version})";
- maintainers = with stdenv.lib.maintainers; [viric];
- platforms = with stdenv.lib.platforms; linux;
- };
-
-})
diff --git a/pkgs/development/compilers/gcc/4.6/ghdl-ortho-cflags.patch b/pkgs/development/compilers/gcc/4.6/ghdl-ortho-cflags.patch
deleted file mode 100644
index 901534591c8f..000000000000
--- a/pkgs/development/compilers/gcc/4.6/ghdl-ortho-cflags.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
-index 8f481df..681ac59 100644
---- a/gcc/vhdl/Make-lang.in
-+++ b/gcc/vhdl/Make-lang.in
-@@ -96,7 +96,7 @@ AGCC_GCCOBJ_DIR=../
- AGCC_INC_FLAGS=-I$(AGCC_GCCOBJ_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/include \
- -I$(AGCC_GCCSRC_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/gcc/config \
- -I$(AGCC_GCCSRC_DIR)/libcpp/include
--AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS)
-+AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS) $(CFLAGS) $(INCLUDES)
-
- AGCC_LOCAL_OBJS=ortho-lang.o
-
-@@ -140,7 +140,7 @@ ghdl$(exeext): force
-
- # Ghdl libraries.
- ghdllib: ghdl$(exeext) $(GCC_PASSES) force
-- $(MAKE_IN_VHDL) GRT_FLAGS="-O -g" ghdllib
-+ $(MAKE_IN_VHDL) GRT_FLAGS="-O -g $(CFLAGS)" ghdllib
-
- # Build hooks:
-
-diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
-index d754c6c..07abc4a 100644
---- a/gcc/vhdl/Makefile.in
-+++ b/gcc/vhdl/Makefile.in
-@@ -80,7 +80,8 @@ T_CPPFLAGS =
- X_ADAFLAGS =
- T_ADAFLAGS =
-
--ADAC = $(CC)
-+# Never use the bootstrapped compiler, as it may not be built for ada
-+ADAC = gcc
-
- ECHO = echo
- CHMOD = chmod
-diff --git a/gcc/vhdl/ortho-lang.c b/gcc/vhdl/ortho-lang.c
-index 84aeb92..8eddd42 100644
---- a/gcc/vhdl/ortho-lang.c
-+++ b/gcc/vhdl/ortho-lang.c
-@@ -16,6 +16,7 @@
- #include "options.h"
- #include "real.h"
--#include "tree-gimple.h"
-+#include "gimple.h"
-+#include "tree.h"
- #include "function.h"
- #include "cgraph.h"
- #include "target.h"
-@@ -680,38 +681,10 @@ type_for_mode (enum machine_mode mode, int unsignedp)
-
- const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
-
--/* Tree code classes. */
--
--#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
--
--const enum tree_code_class tree_code_type[] = {
--#include "tree.def"
-- 'x'
--};
--#undef DEFTREECODE
--
--/* Table indexed by tree code giving number of expression
-- operands beyond the fixed part of the node structure.
-- Not used for types or decls. */
--
--#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
--
--const unsigned char tree_code_length[] = {
--#include "tree.def"
-- 0
--};
--#undef DEFTREECODE
--
--#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) NAME,
--const char * const tree_code_name[] = {
--#include "tree.def"
-- "@@dummy"
--};
--#undef DEFTREECODE
-
- union lang_tree_node
- GTY((desc ("0"),
-- chain_next ("(union lang_tree_node *) GENERIC_NEXT (&%h.generic)")))
-+ chain_next ("(union lang_tree_node *) TREE_CHAIN (&%h.generic)")))
- {
- union tree_node GTY ((tag ("0"))) generic;
- };
-@@ -1162,7 +1135,7 @@ new_access_type (tree dtype)
- res = make_node (POINTER_TYPE);
- TREE_TYPE (res) = NULL_TREE;
- /* Seems necessary. */
-- TYPE_MODE (res) = Pmode;
-+ SET_TYPE_MODE (res, Pmode);
- layout_type (res);
- return res;
- }
-diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
-index e201f64..f36fb97 100644
---- a/gcc/vhdl/Make-lang.in
-+++ b/gcc/vhdl/Make-lang.in
-@@ -132,7 +132,7 @@ ghdl1$(exeext): $(AGCC_OBJS) $(AGCC_DEPS) force
- -cargs $(CFLAGS) $(GHDL_ADAFLAGS)
- $(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aOvhdl ortho_gcc-main \
- -bargs -E -cargs $(CFLAGS) $(GHDL_ADAFLAGS) \
-- -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS)
-+ -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS) $(CLOOGLIBS) $(PPLLIBS)
-
- # The driver for ghdl.
- ghdl$(exeext): force
diff --git a/pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch b/pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch
deleted file mode 100644
index dc8236d2b99f..000000000000
--- a/pkgs/development/compilers/gcc/4.6/hurd-sigrtmin.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-GNU libc on GNU/Hurd doesn't define `__SIGRTMIN'.
-From <http://patch-tracker.debian.org/patch/series/view/gcc-4.6/4.6.3-1/hurd-fixes.diff>.
-
---- a/libgcc/generic-morestack.c 2011-12-19 21:14:52.000000000 +0100
-+++ b/libgcc/generic-morestack.c 2011-12-19 21:15:35.000000000 +0100
-@@ -507,7 +507,7 @@
- sigemptyset (&__morestack_initial_sp.mask);
-
- sigfillset (&__morestack_fullmask);
--#ifdef __GLIBC__
-+#if defined(__GLIBC__) && defined(__SIGRTMIN)
- /* In glibc, the first two real time signals are used by the NPTL
- threading library. By taking them out of the set of signals, we
- avoiding copying the signal mask in pthread_sigmask. More
diff --git a/pkgs/development/compilers/gcc/4.6/no-sys-dirs.patch b/pkgs/development/compilers/gcc/4.6/no-sys-dirs.patch
deleted file mode 100644
index 8128fa87da5f..000000000000
--- a/pkgs/development/compilers/gcc/4.6/no-sys-dirs.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff -ru gcc-4.3.1-orig/gcc/cppdefault.c gcc-4.3.1/gcc/cppdefault.c
---- gcc-4.3.1-orig/gcc/cppdefault.c 2007-07-26 10:37:01.000000000 +0200
-+++ gcc-4.3.1/gcc/cppdefault.c 2008-06-25 17:48:23.000000000 +0200
-@@ -41,6 +41,10 @@
- # undef CROSS_INCLUDE_DIR
- #endif
-
-+#undef LOCAL_INCLUDE_DIR
-+#undef SYSTEM_INCLUDE_DIR
-+#undef STANDARD_INCLUDE_DIR
-+
- const struct default_include cpp_include_defaults[]
- #ifdef INCLUDE_DEFAULTS
- = INCLUDE_DEFAULTS;
-diff -ru gcc-4.3.1-orig/gcc/gcc.c gcc-4.3.1/gcc/gcc.c
---- gcc-4.3.1-orig/gcc/gcc.c 2008-03-02 23:55:19.000000000 +0100
-+++ gcc-4.3.1/gcc/gcc.c 2008-06-25 17:52:53.000000000 +0200
-@@ -1478,10 +1478,10 @@
- /* Default prefixes to attach to command names. */
-
- #ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#define STANDARD_STARTFILE_PREFIX_1 ""
- #endif
- #ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#define STANDARD_STARTFILE_PREFIX_2 ""
- #endif
-
- #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
---- gcc-4.3.1-orig/gcc/Makefile.in 2008-05-11 20:54:15.000000000 +0200
-+++ gcc-4.3.1/gcc/Makefile.in 2008-06-25 17:48:23.000000000 +0200
-@@ -378,7 +378,11 @@
- MD5_H = $(srcdir)/../include/md5.h
-
- # Default native SYSTEM_HEADER_DIR, to be overridden by targets.
--NATIVE_SYSTEM_HEADER_DIR = /usr/include
-+# Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
-+# `fixinc' from fixing header files in /usr/include. However,
-+# NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
-+# it to some dummy directory.
-+NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
- # Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
- CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
-
-@@ -3277,7 +3281,7 @@
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
- -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
- -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
-- -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
-+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
- -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
- -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
- -DPREFIX=\"$(prefix)/\" \
diff --git a/pkgs/development/compilers/gcc/4.6/sources.nix b/pkgs/development/compilers/gcc/4.6/sources.nix
deleted file mode 100644
index ca50160def46..000000000000
--- a/pkgs/development/compilers/gcc/4.6/sources.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Automatically generated by `update-gcc.sh', do not edit.
- For GCC 4.6.4. */
-{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda,
- langGo }:
-
-assert version == "4.6.4";
-optional /* langC */ true (fetchurl {
- url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
- sha256 = "48b566f1288f099dff8fba868499a320f83586245ec69b8c82a9042566a5bf62";
-}) ++
-optional langCC (fetchurl {
- url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
- sha256 = "4eaa347f9cd3ab7d5e14efbb9c5c03009229cd714b558fc55fa56e8996b74d42";
-}) ++
-optional langFortran (fetchurl {
- url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2";
- sha256 = "4f402e0d27995a02354570f0a63047f27463c72c62f1ba3c08ef5a7c6c9c3d1c";
-}) ++
-optional langJava (fetchurl {
- url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2";
- sha256 = "4441d0c3cc04f2162f981c6b4bf29cdd9f6c16d294ce24c6bc4a05d8277abf28";
-}) ++
-optional langAda (fetchurl {
- url = "mirror://gcc/releases/gcc-${version}/gcc-ada-${version}.tar.bz2";
- sha256 = "2a09bbf942b2557839722d4807e67559123037356f5cb1a3b12f44539968d0ad";
-}) ++
-[]
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix
index e4e38022a6bf..a0def65d5313 100644
--- a/pkgs/development/compilers/gcc/4.8/default.nix
+++ b/pkgs/development/compilers/gcc/4.8/default.nix
@@ -33,6 +33,7 @@
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, gnused ? null
+, darwin ? null
}:
assert langJava -> zip != null && unzip != null
@@ -198,7 +199,7 @@ let version = "4.8.5";
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
- bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips && !stdenv.isDarwin;
+ bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips;
in
@@ -332,8 +333,10 @@ stdenv.mkDerivation ({
else ""}
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
- --with-gmp=${gmp.dev}
- --with-mpfr=${mpfr.dev}
+ --with-gmp-include=${gmp.dev}/include
+ --with-gmp-lib=${gmp.out}/lib
+ --with-mpfr-include=${mpfr.dev}/include
+ --with-mpfr-lib=${mpfr.out}/lib
--with-mpc=${libmpc}
${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch
@@ -355,8 +358,10 @@ stdenv.mkDerivation ({
)
)
}
- ${if (stdenv ? glibc && cross == null)
- then " --with-native-system-header-dir=${stdenv.glibc.dev}/include"
+ ${if cross == null
+ then if stdenv.isDarwin
+ then " --with-native-system-header-dir=${darwin.usr-include}"
+ else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
else ""}
${if langAda then " --enable-libada" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
@@ -454,27 +459,25 @@ stdenv.mkDerivation ({
#
# Likewise, the LTO code doesn't find zlib.
- CPATH = concatStrings
- (intersperse ":" (map (x: "${x.dev or x}/include")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread
- ++ optional (libpthreadCross != null) libpthreadCross
+ CPATH = makeSearchPathOutput "dev" "include" ([]
+ ++ optional (zlib != null) zlib
+ ++ optional langJava boehmgc
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread
+ ++ optional (libpthreadCross != null) libpthreadCross
- # On GNU/Hurd glibc refers to Mach & Hurd
- # headers.
- ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
- libcCross.propagatedBuildInputs)));
+ # On GNU/Hurd glibc refers to Mach & Hurd
+ # headers.
+ ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
+ libcCross.propagatedBuildInputs);
- LIBRARY_PATH = concatStrings
- (intersperse ":" (map (x: x + "/lib")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread)));
+ LIBRARY_PATH = makeLibraryPath ([]
+ ++ optional (zlib != null) zlib
+ ++ optional langJava boehmgc
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread);
EXTRA_TARGET_CFLAGS =
if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix
index 01755a74e1ec..4b53bc35599f 100644
--- a/pkgs/development/compilers/gcc/4.9/default.nix
+++ b/pkgs/development/compilers/gcc/4.9/default.nix
@@ -33,6 +33,7 @@
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
, stripped ? true
, gnused ? null
+, darwin ? null
}:
assert langJava -> zip != null && unzip != null
@@ -202,7 +203,7 @@ let version = "4.9.4";
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
- bootstrap = cross == null && !stdenv.isDarwin;
+ bootstrap = cross == null;
in
@@ -364,8 +365,10 @@ stdenv.mkDerivation ({
)
)
}
- ${if (stdenv ? glibc && cross == null)
- then " --with-native-system-header-dir=${stdenv.glibc.dev}/include"
+ ${if cross == null
+ then if stdenv.isDarwin
+ then " --with-native-system-header-dir=${darwin.usr-include}"
+ else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
else ""}
${if langAda then " --enable-libada" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
@@ -463,27 +466,25 @@ stdenv.mkDerivation ({
#
# Likewise, the LTO code doesn't find zlib.
- CPATH = concatStrings
- (intersperse ":" (map (x: "${x.dev or x}/include")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread
- ++ optional (libpthreadCross != null) libpthreadCross
+ CPATH = makeSearchPathOutput "dev" "include" ([]
+ ++ optional (zlib != null) zlib
+ ++ optional langJava boehmgc
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread
+ ++ optional (libpthreadCross != null) libpthreadCross
- # On GNU/Hurd glibc refers to Mach & Hurd
- # headers.
- ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
- libcCross.propagatedBuildInputs)));
+ # On GNU/Hurd glibc refers to Mach & Hurd
+ # headers.
+ ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
+ libcCross.propagatedBuildInputs);
- LIBRARY_PATH = concatStrings
- (intersperse ":" (map (x: x + "/lib")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread)));
+ LIBRARY_PATH = makeLibraryPath ([]
+ ++ optional (zlib != null) zlib
+ ++ optional langJava boehmgc
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread);
EXTRA_TARGET_CFLAGS =
if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix
index f5c69d24d63e..3d75c0e76daa 100644
--- a/pkgs/development/compilers/gcc/5/default.nix
+++ b/pkgs/development/compilers/gcc/5/default.nix
@@ -35,6 +35,7 @@
, gnused ? null
, binutils ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, darwin ? null
}:
assert langJava -> zip != null && unzip != null
@@ -202,7 +203,7 @@ let version = "5.4.0";
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
- bootstrap = cross == null && !stdenv.isDarwin;
+ bootstrap = cross == null;
in
@@ -337,8 +338,10 @@ stdenv.mkDerivation ({
else ""}
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
- --with-gmp=${gmp.dev}
- --with-mpfr=${mpfr.dev}
+ --with-gmp-include=${gmp.dev}/include
+ --with-gmp-lib=${gmp.out}/lib
+ --with-mpfr-include=${mpfr.dev}/include
+ --with-mpfr-lib=${mpfr.out}/lib
--with-mpc=${libmpc}
${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch
@@ -360,8 +363,10 @@ stdenv.mkDerivation ({
)
)
}
- ${if (stdenv ? glibc && cross == null)
- then " --with-native-system-header-dir=${stdenv.glibc.dev}/include"
+ ${if cross == null
+ then if stdenv.isDarwin
+ then " --with-native-system-header-dir=${darwin.usr-include}"
+ else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
else ""}
${if langAda then " --enable-libada" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
@@ -458,27 +463,25 @@ stdenv.mkDerivation ({
#
# Likewise, the LTO code doesn't find zlib.
- CPATH = concatStrings
- (intersperse ":" (map (x: "${x.dev or x}/include")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread
- ++ optional (libpthreadCross != null) libpthreadCross
+ CPATH = makeSearchPathOutput "dev" "include" ([]
+ ++ optional (zlib != null) zlib
+ ++ optionals langJava [ boehmgc ]
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread
+ ++ optional (libpthreadCross != null) libpthreadCross
- # On GNU/Hurd glibc refers to Mach & Hurd
- # headers.
- ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
- libcCross.propagatedBuildInputs)));
+ # On GNU/Hurd glibc refers to Mach & Hurd
+ # headers.
+ ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
+ libcCross.propagatedBuildInputs);
- LIBRARY_PATH = concatStrings
- (intersperse ":" (map (x: x + "/lib")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread)));
+ LIBRARY_PATH = makeLibraryPath ([]
+ ++ optional (zlib != null) zlib
+ ++ optional langJava boehmgc
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread);
EXTRA_TARGET_CFLAGS =
if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix
index 129bde908faf..acddc9081be0 100644
--- a/pkgs/development/compilers/gcc/6/default.nix
+++ b/pkgs/development/compilers/gcc/6/default.nix
@@ -35,6 +35,7 @@
, gnused ? null
, binutils ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, darwin ? null
}:
assert langJava -> zip != null && unzip != null
@@ -201,7 +202,7 @@ let version = "6.2.0";
stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
- bootstrap = cross == null && !stdenv.isDarwin;
+ bootstrap = cross == null;
in
@@ -335,8 +336,10 @@ stdenv.mkDerivation ({
else ""}
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
- --with-gmp=${gmp.dev}
- --with-mpfr=${mpfr.dev}
+ --with-gmp-include=${gmp.dev}/include
+ --with-gmp-lib=${gmp.out}/lib
+ --with-mpfr-include=${mpfr.dev}/include
+ --with-mpfr-lib=${mpfr.out}/lib
--with-mpc=${libmpc}
${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch
@@ -358,8 +361,10 @@ stdenv.mkDerivation ({
)
)
}
- ${if (stdenv ? glibc && cross == null)
- then " --with-native-system-header-dir=${stdenv.glibc.dev}/include"
+ ${if cross == null
+ then if stdenv.isDarwin
+ then " --with-native-system-header-dir=${darwin.usr-include}"
+ else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include"
else ""}
${if langAda then " --enable-libada" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
@@ -456,27 +461,25 @@ stdenv.mkDerivation ({
#
# Likewise, the LTO code doesn't find zlib.
- CPATH = concatStrings
- (intersperse ":" (map (x: "${x.dev or x}/include")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread
- ++ optional (libpthreadCross != null) libpthreadCross
+ CPATH = makeSearchPathOutput "dev" "include" ([]
+ ++ optional (zlib != null) zlib
+ ++ optional langJava boehmgc
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread
+ ++ optional (libpthreadCross != null) libpthreadCross
- # On GNU/Hurd glibc refers to Mach & Hurd
- # headers.
- ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" )
- libcCross.propagatedBuildInputs)));
+ # On GNU/Hurd glibc refers to Mach & Hurd
+ # headers.
+ ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs")
+ libcCross.propagatedBuildInputs);
- LIBRARY_PATH = concatStrings
- (intersperse ":" (map (x: x + "/lib")
- (optionals (zlib != null) [ zlib ]
- ++ optionals langJava [ boehmgc ]
- ++ optionals javaAwtGtk xlibs
- ++ optionals javaAwtGtk [ gmp mpfr ]
- ++ optional (libpthread != null) libpthread)));
+ LIBRARY_PATH = makeLibraryPath ([]
+ ++ optional (zlib != null) zlib
+ ++ optional langJava boehmgc
+ ++ optionals javaAwtGtk xlibs
+ ++ optionals javaAwtGtk [ gmp mpfr ]
+ ++ optional (libpthread != null) libpthread);
EXTRA_TARGET_CFLAGS =
if cross != null && libcCross != null then [
diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh
index 0371630f3f69..de3e9ba3ef5f 100644
--- a/pkgs/development/compilers/gcc/builder.sh
+++ b/pkgs/development/compilers/gcc/builder.sh
@@ -218,6 +218,15 @@ postInstall() {
substituteInPlace "$i" --replace "$out" "$lib"
done
+ if [ -n "$enableMultilib" ]; then
+ moveToOutput "lib64/lib*.so*" "$lib"
+ moveToOutput "lib64/lib*.la" "$lib"
+
+ for i in "$lib"/lib64/*.{la,py}; do
+ substituteInPlace "$i" --replace "$out" "$lib"
+ done
+ fi
+
# Remove `fixincl' to prevent a retained dependency on the
# previous gcc.
rm -rf $out/libexec/gcc/*/*/install-tools
@@ -227,19 +236,19 @@ postInstall() {
rm -rf $out/bin/gccbug
if type "patchelf"; then
- # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
- for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); do
+ # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
+ for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); do
PREV_RPATH=`patchelf --print-rpath "$i"`
NEW_RPATH=`echo "$PREV_RPATH" | sed 's,:[^:]*bootstrap-tools/lib,,g'`
patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK
- done
+ done
- # For some reason the libs retain RPATH to $out
- for i in "$lib"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do
+ # For some reason the libs retain RPATH to $out
+ for i in "$lib"/lib/{libtsan,libasan,libubsan}.so.*.*.*; do
PREV_RPATH=`patchelf --print-rpath "$i"`
NEW_RPATH=`echo "$PREV_RPATH" | sed "s,:${out}[^:]*,,g"`
patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK
- done
+ done
fi
# Get rid of some "fixed" header files
diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix
index eebdaca5f83c..aad8a9f6bcba 100644
--- a/pkgs/development/compilers/ghc/head.nix
+++ b/pkgs/development/compilers/ghc/head.nix
@@ -6,14 +6,14 @@ let
inherit (bootPkgs) ghc;
in stdenv.mkDerivation rec {
- version = "8.1.20160826";
+ version = "8.1.20160930";
name = "ghc-${version}";
- rev = "0050aff22ba04baca732bf5124002417ab667f8a";
+ rev = "9e862765ffe161da8a4fd9cd67b0a600874feaa9";
src = fetchgit {
url = "git://git.haskell.org/ghc.git";
inherit rev;
- sha256 = "1iirb11fr8914pb6i988cfji56gs698ll819bgb0hpcdkrmffwqc";
+ sha256 = "01fmp5yrh3is8vzv2vabkzlvm1ry1zcq99m078plx9wgy20giq59";
};
patches = [
diff --git a/pkgs/development/compilers/glslang/default.nix b/pkgs/development/compilers/glslang/default.nix
new file mode 100644
index 000000000000..63b4b4c2c4f3
--- /dev/null
+++ b/pkgs/development/compilers/glslang/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchFromGitHub, cmake, bison }:
+
+stdenv.mkDerivation rec {
+ name = "glslang-git-${version}";
+ version = "2016-08-26";
+
+ # `vulkan-loader` requires a specific version of `glslang` as specified in
+ # `<vulkan-loader-repo>/glslang_revision`.
+ src = fetchFromGitHub {
+ owner = "KhronosGroup";
+ repo = "glslang";
+ rev = "81cd764b5ffc475bc73f1fb35f75fd1171bb2343";
+ sha256 = "1vfwl6lzkjh9nh29q32b7zca4q1abf3q4nqkahskijgznw5lr59g";
+ };
+
+ patches = [ ./install-headers.patch ];
+
+ buildInputs = [ cmake bison ];
+ enableParallelBuilding = true;
+
+ meta = with stdenv.lib; {
+ inherit (src.meta) homepage;
+ description = "Khronos reference front-end for GLSL and ESSL";
+ };
+}
diff --git a/pkgs/development/compilers/glslang/install-headers.patch b/pkgs/development/compilers/glslang/install-headers.patch
new file mode 100644
index 000000000000..9ad6f5e19068
--- /dev/null
+++ b/pkgs/development/compilers/glslang/install-headers.patch
@@ -0,0 +1,26 @@
+diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt
+index 48a6c46..593d941 100755
+--- a/SPIRV/CMakeLists.txt
++++ b/SPIRV/CMakeLists.txt
+@@ -42,3 +42,8 @@ endif(WIN32)
+
+ install(TARGETS SPIRV SPVRemapper
+ ARCHIVE DESTINATION lib)
++
++foreach(file ${HEADERS} ${SPVREMAP_HEADERS})
++ get_filename_component(dir ${file} DIRECTORY)
++ install(FILES ${file} DESTINATION include/SPIRV/${dir})
++endforeach()
+diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt
+index ff91135..4318279 100644
+--- a/glslang/CMakeLists.txt
++++ b/glslang/CMakeLists.txt
+@@ -90,3 +90,8 @@ endif(WIN32)
+
+ install(TARGETS glslang
+ ARCHIVE DESTINATION lib)
++
++foreach(file ${HEADERS})
++ get_filename_component(dir ${file} DIRECTORY)
++ install(FILES ${file} DESTINATION include/glslang/${dir})
++endforeach()
diff --git a/pkgs/development/compilers/go/1.7.nix b/pkgs/development/compilers/go/1.7.nix
index 0f78646e1aa0..3def735ec8d3 100644
--- a/pkgs/development/compilers/go/1.7.nix
+++ b/pkgs/development/compilers/go/1.7.nix
@@ -138,7 +138,7 @@ stdenv.mkDerivation rec {
preFixup = ''
rm -r $out/share/go/pkg/bootstrap
- mv $out/share/go/bin $out/bin
+ ln -s $out/share/go/bin $out/bin
'';
setupHook = ./setup-hook.sh;
diff --git a/pkgs/development/compilers/hhvm/default.nix b/pkgs/development/compilers/hhvm/default.nix
index 6e4cd9a9c73c..e6f98a121946 100644
--- a/pkgs/development/compilers/hhvm/default.nix
+++ b/pkgs/development/compilers/hhvm/default.nix
@@ -46,8 +46,6 @@ stdenv.mkDerivation rec {
patchShebangs .
'';
- cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
-
meta = {
description = "High-performance JIT compiler for PHP/Hack";
homepage = "http://hhvm.com";
diff --git a/pkgs/development/compilers/jhc/default.nix b/pkgs/development/compilers/jhc/default.nix
index fa8a8c04b823..77e02f3a4103 100644
--- a/pkgs/development/compilers/jhc/default.nix
+++ b/pkgs/development/compilers/jhc/default.nix
@@ -16,6 +16,11 @@ stdenv.mkDerivation rec {
buildInputs = [ perl ghc ];
+ preConfigure = ''
+ configureFlagsArray+=("CC=cc")
+ configureFlagsArray+=("--with-hsc2hs=${ghc}/bin/hsc2hs --cc=cc")
+ '';
+
meta = {
description = "Whole-program, globally optimizing Haskell compiler";
homepage = "http://repetae.net/computer/jhc/";
diff --git a/pkgs/development/compilers/kotlin/default.nix b/pkgs/development/compilers/kotlin/default.nix
index ba546f6f51fc..f0f8fa3b7ff2 100644
--- a/pkgs/development/compilers/kotlin/default.nix
+++ b/pkgs/development/compilers/kotlin/default.nix
@@ -1,12 +1,12 @@
{ stdenv, fetchurl, makeWrapper, jre, unzip }:
stdenv.mkDerivation rec {
- version = "1.0.3";
+ version = "1.0.4";
name = "kotlin-${version}";
src = fetchurl {
url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
- sha256 = "15ywjv46i2d7zgg2b3vdklc6agr62nvn0gkz7k9hql78ccfmyq9p";
+ sha512 = "39mcyw3rdgrhfkxl0xygh74idl2pvw3dy0n9d3z4aj6hq4pxkn1dclmpfbrfa333vjpzfhlqwl578vmly9vah7m6z6g4j12gkdijiyf";
};
propagatedBuildInputs = [ jre ] ;
diff --git a/pkgs/development/compilers/llvm/3.4/clang.nix b/pkgs/development/compilers/llvm/3.4/clang.nix
index 2dd3a23d7668..b05496eabf26 100644
--- a/pkgs/development/compilers/llvm/3.4/clang.nix
+++ b/pkgs/development/compilers/llvm/3.4/clang.nix
@@ -20,7 +20,6 @@ stdenv.mkDerivation {
buildInputs = [ cmake libedit libxml2 zlib ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
] ++
diff --git a/pkgs/development/compilers/llvm/3.4/lld.nix b/pkgs/development/compilers/llvm/3.4/lld.nix
index 4360ec9ad1b2..c502b0e215e5 100644
--- a/pkgs/development/compilers/llvm/3.4/lld.nix
+++ b/pkgs/development/compilers/llvm/3.4/lld.nix
@@ -14,7 +14,6 @@ stdenv.mkDerivation {
buildInputs = [ cmake ncurses zlib python ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DLLD_PATH_TO_LLVM_BUILD=${llvm}"
];
diff --git a/pkgs/development/compilers/llvm/3.4/lldb.nix b/pkgs/development/compilers/llvm/3.4/lldb.nix
index 540faf01e079..cd498b5cf519 100644
--- a/pkgs/development/compilers/llvm/3.4/lldb.nix
+++ b/pkgs/development/compilers/llvm/3.4/lldb.nix
@@ -26,7 +26,6 @@ stdenv.mkDerivation {
buildInputs = [ cmake python which swig ncurses zlib libedit ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
"-DLLDB_PATH_TO_CLANG_BUILD=${clang}"
diff --git a/pkgs/development/compilers/llvm/3.4/polly.nix b/pkgs/development/compilers/llvm/3.4/polly.nix
index 2e0018c34c20..2fed0fc8abed 100644
--- a/pkgs/development/compilers/llvm/3.4/polly.nix
+++ b/pkgs/development/compilers/llvm/3.4/polly.nix
@@ -10,7 +10,6 @@ stdenv.mkDerivation {
buildInputs = [ cmake isl python gmp ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DLLVM_INSTALL_ROOT=${llvm}"
];
diff --git a/pkgs/development/compilers/llvm/3.5/clang.nix b/pkgs/development/compilers/llvm/3.5/clang.nix
index 42ca4ba70e4d..d11259c82f07 100644
--- a/pkgs/development/compilers/llvm/3.5/clang.nix
+++ b/pkgs/development/compilers/llvm/3.5/clang.nix
@@ -15,7 +15,6 @@ in stdenv.mkDerivation {
buildInputs = [ cmake libedit libxml2 llvm ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
] ++
# Maybe with compiler-rt this won't be needed?
diff --git a/pkgs/development/compilers/llvm/3.5/libc++/default.nix b/pkgs/development/compilers/llvm/3.5/libc++/default.nix
index e7018eea3bc9..476fc7bcd43f 100644
--- a/pkgs/development/compilers/llvm/3.5/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/3.5/libc++/default.nix
@@ -24,13 +24,12 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
- cmakeFlags =
- [ "-DCMAKE_BUILD_TYPE=Release"
- "-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${libcxxabi}/include"
- "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
- "-DLIBCXX_LIBCPPABI_VERSION=2"
- "-DLIBCXX_CXX_ABI=libcxxabi"
- ];
+ cmakeFlags = [
+ "-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${libcxxabi}/include"
+ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+ "-DLIBCXX_LIBCPPABI_VERSION=2"
+ "-DLIBCXX_CXX_ABI=libcxxabi"
+ ];
enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/llvm/3.5/lld.nix b/pkgs/development/compilers/llvm/3.5/lld.nix
index b1047f8679ec..7ee90818ac99 100644
--- a/pkgs/development/compilers/llvm/3.5/lld.nix
+++ b/pkgs/development/compilers/llvm/3.5/lld.nix
@@ -14,7 +14,6 @@ stdenv.mkDerivation {
buildInputs = [ cmake ncurses zlib python ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DLLD_PATH_TO_LLVM_BUILD=${llvm}"
];
diff --git a/pkgs/development/compilers/llvm/3.5/lldb.nix b/pkgs/development/compilers/llvm/3.5/lldb.nix
index 1dad5227d645..8e7c8151df13 100644
--- a/pkgs/development/compilers/llvm/3.5/lldb.nix
+++ b/pkgs/development/compilers/llvm/3.5/lldb.nix
@@ -26,7 +26,6 @@ stdenv.mkDerivation {
buildInputs = [ cmake python which swig ncurses zlib libedit ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
"-DLLDB_PATH_TO_CLANG_BUILD=${clang}"
diff --git a/pkgs/development/compilers/llvm/3.5/polly.nix b/pkgs/development/compilers/llvm/3.5/polly.nix
index c943c790ea22..42b3fd74e6c8 100644
--- a/pkgs/development/compilers/llvm/3.5/polly.nix
+++ b/pkgs/development/compilers/llvm/3.5/polly.nix
@@ -10,7 +10,6 @@ stdenv.mkDerivation {
buildInputs = [ cmake isl python gmp ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DLLVM_INSTALL_ROOT=${llvm}"
];
diff --git a/pkgs/development/compilers/llvm/3.6/clang/default.nix b/pkgs/development/compilers/llvm/3.6/clang/default.nix
index ff0f34391af0..c1d0cf8062c8 100644
--- a/pkgs/development/compilers/llvm/3.6/clang/default.nix
+++ b/pkgs/development/compilers/llvm/3.6/clang/default.nix
@@ -16,7 +16,6 @@ let
buildInputs = [ cmake libedit libxml2 llvm ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
] ++
# Maybe with compiler-rt this won't be needed?
diff --git a/pkgs/development/compilers/llvm/3.6/libc++/default.nix b/pkgs/development/compilers/llvm/3.6/libc++/default.nix
index c02c75ac02db..b07b8eb35fa6 100644
--- a/pkgs/development/compilers/llvm/3.6/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/3.6/libc++/default.nix
@@ -19,13 +19,12 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
- cmakeFlags =
- [ "-DCMAKE_BUILD_TYPE=Release"
- "-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${libcxxabi}/include"
- "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
- "-DLIBCXX_LIBCPPABI_VERSION=2"
- "-DLIBCXX_CXX_ABI=libcxxabi"
- ];
+ cmakeFlags = [
+ "-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${libcxxabi}/include"
+ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+ "-DLIBCXX_LIBCPPABI_VERSION=2"
+ "-DLIBCXX_CXX_ABI=libcxxabi"
+ ];
enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/llvm/3.6/lldb.nix b/pkgs/development/compilers/llvm/3.6/lldb.nix
index cee99bbbdea6..207971b81727 100644
--- a/pkgs/development/compilers/llvm/3.6/lldb.nix
+++ b/pkgs/development/compilers/llvm/3.6/lldb.nix
@@ -26,7 +26,6 @@ stdenv.mkDerivation {
buildInputs = [ cmake python which swig ncurses zlib libedit ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
"-DLLDB_PATH_TO_CLANG_BUILD=${clang-unwrapped}"
diff --git a/pkgs/development/compilers/llvm/3.7/clang/default.nix b/pkgs/development/compilers/llvm/3.7/clang/default.nix
index aa71bb68553a..6c1a89cf60a9 100644
--- a/pkgs/development/compilers/llvm/3.7/clang/default.nix
+++ b/pkgs/development/compilers/llvm/3.7/clang/default.nix
@@ -16,7 +16,6 @@ let
buildInputs = [ cmake libedit libxml2 llvm ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
] ++
# Maybe with compiler-rt this won't be needed?
diff --git a/pkgs/development/compilers/llvm/3.7/default.nix b/pkgs/development/compilers/llvm/3.7/default.nix
index d7864d11d7bf..3df20086f79b 100644
--- a/pkgs/development/compilers/llvm/3.7/default.nix
+++ b/pkgs/development/compilers/llvm/3.7/default.nix
@@ -1,4 +1,4 @@
-{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC }:
+{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }:
let
callPackage = newScope (self // { inherit stdenv isl version fetch; });
@@ -24,8 +24,19 @@ let
clang = wrapCC self.clang-unwrapped;
+ libcxxClang = ccWrapperFun {
+ cc = self.clang-unwrapped;
+ isClang = true;
+ inherit (self) stdenv;
+ /* FIXME is this right? */
+ inherit (stdenv.cc) libc nativeTools nativeLibc;
+ extraPackages = [ self.libcxx self.libcxxabi ];
+ };
+
stdenv = overrideCC stdenv self.clang;
+ libcxxStdenv = overrideCC stdenv self.libcxxClang;
+
lldb = callPackage ./lldb.nix {};
libcxx = callPackage ./libc++ {};
diff --git a/pkgs/development/compilers/llvm/3.7/libc++/default.nix b/pkgs/development/compilers/llvm/3.7/libc++/default.nix
index 00bfb3518b10..62402142a129 100644
--- a/pkgs/development/compilers/llvm/3.7/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/3.7/libc++/default.nix
@@ -18,12 +18,11 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
- cmakeFlags =
- [ "-DCMAKE_BUILD_TYPE=Release"
- "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
- "-DLIBCXX_LIBCPPABI_VERSION=2"
- "-DLIBCXX_CXX_ABI=libcxxabi"
- ];
+ cmakeFlags = [
+ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+ "-DLIBCXX_LIBCPPABI_VERSION=2"
+ "-DLIBCXX_CXX_ABI=libcxxabi"
+ ];
enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/llvm/3.7/lldb.nix b/pkgs/development/compilers/llvm/3.7/lldb.nix
index fe69130e71a7..434fdc7650ff 100644
--- a/pkgs/development/compilers/llvm/3.7/lldb.nix
+++ b/pkgs/development/compilers/llvm/3.7/lldb.nix
@@ -8,7 +8,7 @@
, libedit
, llvm
, clang-unwrapped
-, python
+, python2
, version
}:
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
scripts/Python/build-swig-Python.sh
'';
- buildInputs = [ cmake python which swig ncurses zlib libedit ];
+ buildInputs = [ cmake python2 which swig ncurses zlib libedit ];
preConfigure = ''
export CXXFLAGS="-pthread"
@@ -31,7 +31,6 @@ stdenv.mkDerivation {
'';
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
"-DLLDB_PATH_TO_CLANG_BUILD=${clang-unwrapped}"
"-DPYTHON_VERSION_MAJOR=2"
diff --git a/pkgs/development/compilers/llvm/3.7/llvm.nix b/pkgs/development/compilers/llvm/3.7/llvm.nix
index cc65c69927c5..c674b959c787 100644
--- a/pkgs/development/compilers/llvm/3.7/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.7/llvm.nix
@@ -3,7 +3,7 @@
, perl
, groff
, cmake
-, python
+, python2
, libffi
, binutils
, libxml2
@@ -30,11 +30,23 @@ in stdenv.mkDerivation rec {
mv compiler-rt-* $sourceRoot/projects/compiler-rt
'';
- buildInputs = [ perl groff cmake libxml2 python libffi ]
+ buildInputs = [ perl groff cmake libxml2 python2 libffi ]
++ stdenv.lib.optional stdenv.isDarwin libcxxabi;
propagatedBuildInputs = [ ncurses zlib ];
+ # The goal here is to disable LLVM bindings (currently go and ocaml) regardless
+ # of whether the impure CMake search sheananigans find the compilers in global
+ # paths. This mostly exists because sandbox builds don't work very well on Darwin
+ # and sometimes you get weird behavior if CMake finds go in your system path.
+ # This would be far prettier if there were a CMake option to just disable bindings
+ # but from what I can tell, there isn't such a thing. The file in question only
+ # contains `if(WIN32)` conditions to check whether to disable bindings, so making
+ # those always succeed has the net effect of disabling all bindings.
+ prePatch = ''
+ substituteInPlace cmake/config-ix.cmake --replace "if(WIN32)" "if(1)"
+ '';
+
# hacky fix: created binaries need to be run before installation
preBuild = ''
mkdir -p $out/
diff --git a/pkgs/development/compilers/llvm/3.8/clang/default.nix b/pkgs/development/compilers/llvm/3.8/clang/default.nix
index 71420d4cdccd..6052246dad07 100644
--- a/pkgs/development/compilers/llvm/3.8/clang/default.nix
+++ b/pkgs/development/compilers/llvm/3.8/clang/default.nix
@@ -6,7 +6,7 @@ let
name = "clang-${version}";
unpackPhase = ''
- unpackFile ${fetch "cfe" "1ybcac8hlr9vl3wg8s4v6cp0c0qgqnwprsv85lihbkq3vqv94504"}
+ unpackFile ${fetch "cfe" "1prc72xmkgx8wrzmrr337776676nhsp1qd3mw2bvb22bzdnq7lsc"}
mv cfe-${version}.src clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
@@ -16,7 +16,6 @@ let
buildInputs = [ cmake libedit libxml2 llvm python ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
] ++
# Maybe with compiler-rt this won't be needed?
@@ -30,12 +29,23 @@ let
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
'';
+ outputs = [ "out" "python" ];
+
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp
+
+ mkdir -p $python/bin $python/share/clang/
+ mv $out/bin/{git-clang-format,scan-view} $python/bin
+ if [ -e $out/bin/set-xcode-analyzer ]; then
+ mv $out/bin/set-xcode-analyzer $python/bin
+ fi
+ mv $out/share/clang/*.py $python/share/clang
+
+ rm $out/bin/c-index-test
'';
enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/llvm/3.8/default.nix b/pkgs/development/compilers/llvm/3.8/default.nix
index a2a702a617ee..04cd9f791e62 100644
--- a/pkgs/development/compilers/llvm/3.8/default.nix
+++ b/pkgs/development/compilers/llvm/3.8/default.nix
@@ -1,8 +1,8 @@
-{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC }:
+{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun }:
let
callPackage = newScope (self // { inherit stdenv isl version fetch; });
- version = "3.8.0";
+ version = "3.8.1";
fetch = fetch_v version;
fetch_v = ver: name: sha256: fetchurl {
@@ -10,8 +10,8 @@ let
inherit sha256;
};
- compiler-rt_src = fetch "compiler-rt" "1c2nkp9563873ffz22qmhc0wakgj428pch8rmhym8agjamz3ily8";
- clang-tools-extra_src = fetch "clang-tools-extra" "1i0yrgj8qrzjjswraz0i55lg92ljpqhvjr619d268vka208aigdg";
+ compiler-rt_src = fetch "compiler-rt" "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d";
+ clang-tools-extra_src = fetch "clang-tools-extra" "15n39r4ssphpaq4a0wzyjm7ilwxb0bch6nrapy8c5s8d49h5qjk6";
self = {
llvm = callPackage ./llvm.nix {
@@ -24,8 +24,19 @@ let
clang = wrapCC self.clang-unwrapped;
+ libcxxClang = ccWrapperFun {
+ cc = self.clang-unwrapped;
+ isClang = true;
+ inherit (self) stdenv;
+ /* FIXME is this right? */
+ inherit (stdenv.cc) libc nativeTools nativeLibc;
+ extraPackages = [ self.libcxx self.libcxxabi ];
+ };
+
stdenv = overrideCC stdenv self.clang;
+ libcxxStdenv = overrideCC stdenv self.libcxxClang;
+
lldb = callPackage ./lldb.nix {};
libcxx = callPackage ./libc++ {};
diff --git a/pkgs/development/compilers/llvm/3.8/libc++/default.nix b/pkgs/development/compilers/llvm/3.8/libc++/default.nix
index f10dcb6784ca..15f7ee1e3e4a 100644
--- a/pkgs/development/compilers/llvm/3.8/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/3.8/libc++/default.nix
@@ -3,7 +3,7 @@
stdenv.mkDerivation rec {
name = "libc++-${version}";
- src = fetch "libcxx" "0yr3fh8vj38289b9cwk37zsy7x98dcd3kjy7xxy8mg20p48lb01n";
+ src = fetch "libcxx" "1k7f9qk5bgwa02ksh6yr9hccwcbhmcdzl1fpbdw6s2c89iwg7mvp";
postUnpack = ''
unpackFile ${libcxxabi.src}
@@ -18,12 +18,11 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
- cmakeFlags =
- [ "-DCMAKE_BUILD_TYPE=Release"
- "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
- "-DLIBCXX_LIBCPPABI_VERSION=2"
- "-DLIBCXX_CXX_ABI=libcxxabi"
- ];
+ cmakeFlags = [
+ "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+ "-DLIBCXX_LIBCPPABI_VERSION=2"
+ "-DLIBCXX_CXX_ABI=libcxxabi"
+ ];
enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/llvm/3.8/libc++abi.nix b/pkgs/development/compilers/llvm/3.8/libc++abi.nix
index fdbc002688e9..61ff6341c30a 100644
--- a/pkgs/development/compilers/llvm/3.8/libc++abi.nix
+++ b/pkgs/development/compilers/llvm/3.8/libc++abi.nix
@@ -3,7 +3,7 @@
stdenv.mkDerivation {
name = "libc++abi-${version}";
- src = fetch "libcxxabi" "0175rv2ynkklbg96kpw13iwhnzyrlw3r12f4h09p9v7nmxqhivn5";
+ src = fetch "libcxxabi" "1qfs2iis1i0ppv11jndc98cvd7s25pj46pq2sfyldmzswdxmzdg1";
buildInputs = [ cmake ] ++ stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
diff --git a/pkgs/development/compilers/llvm/3.8/lldb.nix b/pkgs/development/compilers/llvm/3.8/lldb.nix
index ca8a74c28bb6..568476e44ac2 100644
--- a/pkgs/development/compilers/llvm/3.8/lldb.nix
+++ b/pkgs/development/compilers/llvm/3.8/lldb.nix
@@ -15,7 +15,7 @@
stdenv.mkDerivation {
name = "lldb-${version}";
- src = fetch "lldb" "0dasg12gf5crrd9pbi5rd1y8vwlgqp8nxgw9g4z47w3x2i28zxp3";
+ src = fetch "lldb" "18z8vhfgh4m57hl66i83cp4d4mv3i86z2hjhbp5rvqs7d88li49l";
postUnpack = ''
# Hack around broken standalone builf as of 3.8
@@ -25,15 +25,11 @@ stdenv.mkDerivation {
cp "$(ls -d llvm-*.src)/lib/Support/regex_impl.h" "$srcDir/tools/lib/Support/"
'';
- buildInputs = [ cmake python which swig ncurses zlib libedit ];
+ buildInputs = [ cmake python which swig ncurses zlib libedit llvm ];
- preConfigure = ''
- export CXXFLAGS="-pthread"
- export LDFLAGS="-ldl"
- '';
+ hardeningDisable = [ "format" ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
"-DLLVM_MAIN_INCLUDE_DIR=${llvm}/include"
"-DLLDB_PATH_TO_CLANG_BUILD=${clang-unwrapped}"
diff --git a/pkgs/development/compilers/llvm/3.8/llvm.nix b/pkgs/development/compilers/llvm/3.8/llvm.nix
index fc29d00a5245..6112228bf4fc 100644
--- a/pkgs/development/compilers/llvm/3.8/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.8/llvm.nix
@@ -18,7 +18,7 @@
}:
let
- src = fetch "llvm" "0ikfq0gxac8xpvxj23l4hk8f12ydx48fljgrz1gl9xp0ks704nsm";
+ src = fetch "llvm" "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf";
in stdenv.mkDerivation rec {
name = "llvm-${version}";
diff --git a/pkgs/development/compilers/llvm/3.9/clang/default.nix b/pkgs/development/compilers/llvm/3.9/clang/default.nix
index e75da0e9717e..6eadb91141d9 100644
--- a/pkgs/development/compilers/llvm/3.9/clang/default.nix
+++ b/pkgs/development/compilers/llvm/3.9/clang/default.nix
@@ -16,7 +16,6 @@ let
buildInputs = [ cmake libedit libxml2 llvm python ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DCMAKE_CXX_FLAGS=-std=c++11"
] ++
# Maybe with compiler-rt this won't be needed?
diff --git a/pkgs/development/compilers/llvm/3.9/default.nix b/pkgs/development/compilers/llvm/3.9/default.nix
index a39f013d1a9a..49fdad931b69 100644
--- a/pkgs/development/compilers/llvm/3.9/default.nix
+++ b/pkgs/development/compilers/llvm/3.9/default.nix
@@ -1,4 +1,4 @@
-{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC }:
+{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
let
callPackage = newScope (self // { inherit stdenv isl version fetch; });
@@ -24,8 +24,19 @@ let
clang = wrapCC self.clang-unwrapped;
+ libcxxClang = ccWrapperFun {
+ cc = self.clang-unwrapped;
+ isClang = true;
+ inherit (self) stdenv;
+ /* FIXME is this right? */
+ inherit (stdenv.cc) libc nativeTools nativeLibc;
+ extraPackages = [ self.libcxx self.libcxxabi ];
+ };
+
stdenv = overrideCC stdenv self.clang;
+ libcxxStdenv = overrideCC stdenv self.libcxxClang;
+
lldb = callPackage ./lldb.nix {};
libcxx = callPackage ./libc++ {};
diff --git a/pkgs/development/compilers/llvm/3.9/libc++/default.nix b/pkgs/development/compilers/llvm/3.9/libc++/default.nix
index 97cf65ad2090..3b7caaa24bf5 100644
--- a/pkgs/development/compilers/llvm/3.9/libc++/default.nix
+++ b/pkgs/development/compilers/llvm/3.9/libc++/default.nix
@@ -18,8 +18,7 @@ stdenv.mkDerivation rec {
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
- cmakeFlags =
- [ "-DCMAKE_BUILD_TYPE=Release"
+ cmakeFlags = [
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
"-DLIBCXX_LIBCPPABI_VERSION=2"
"-DLIBCXX_CXX_ABI=libcxxabi"
diff --git a/pkgs/development/compilers/llvm/3.9/lldb.nix b/pkgs/development/compilers/llvm/3.9/lldb.nix
index bb92a6eed6c0..0acef48f57b4 100644
--- a/pkgs/development/compilers/llvm/3.9/lldb.nix
+++ b/pkgs/development/compilers/llvm/3.9/lldb.nix
@@ -41,7 +41,6 @@ stdenv.mkDerivation {
hardeningDisable = [ "format" ];
cmakeFlags = [
- "-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_MAIN_INCLUDE_DIR=${llvm}/include"
];
diff --git a/pkgs/development/compilers/llvm/3.9/llvm-outputs.patch b/pkgs/development/compilers/llvm/3.9/llvm-outputs.patch
new file mode 100644
index 000000000000..40096fa3497f
--- /dev/null
+++ b/pkgs/development/compilers/llvm/3.9/llvm-outputs.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 94d426b..37f7794 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
+ ActiveIncludeOption = "-I" + ActiveIncludeDir;
+ }
+
++ /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
++ if (!IsInDevelopmentTree) {
++ bool WantShared = true;
++ for (int i = 1; i < argc; ++i) {
++ StringRef Arg = argv[i];
++ if (Arg == "--link-shared")
++ WantShared = true;
++ else if (Arg == "--link-static")
++ WantShared = false; // the last one wins
++ }
++
++ if (WantShared)
++ ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
++ }
++
+ /// We only use `shared library` mode in cases where the static library form
+ /// of the components provided are not available; note however that this is
+ /// skipped if we're run from within the build dir. However, once installed,
diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix
index 41d655015e46..8086f980bcf5 100644
--- a/pkgs/development/compilers/llvm/3.9/llvm.nix
+++ b/pkgs/development/compilers/llvm/3.9/llvm.nix
@@ -15,10 +15,16 @@
, libcxxabi
, debugVersion ? false
, enableSharedLibraries ? true
+, darwin
}:
let
src = fetch "llvm" "0j49lkd5d7nnpdqzaybs2472bvcxyx0i4r3iccwf3kj2v9wk3iv6";
+ shlib = if stdenv.isDarwin then "dylib" else "so";
+
+ # Used when creating a version-suffixed symlink of libLLVM.dylib
+ shortVersion = with stdenv.lib;
+ concatStringsSep "." (take 2 (splitString "." version));
in stdenv.mkDerivation rec {
name = "llvm-${version}";
@@ -30,16 +36,25 @@ in stdenv.mkDerivation rec {
mv compiler-rt-* $sourceRoot/projects/compiler-rt
'';
+ outputs = [ "out" ] ++ stdenv.lib.optional enableSharedLibraries "lib";
+
buildInputs = [ perl groff cmake libxml2 python libffi ]
- ++ stdenv.lib.optional stdenv.isDarwin libcxxabi;
+ ++ stdenv.lib.optionals stdenv.isDarwin
+ [ libcxxabi darwin.cctools darwin.apple_sdk.libs.xpc ];
propagatedBuildInputs = [ ncurses zlib ];
+ postPatch = ""
# hacky fix: New LLVM releases require a newer OS X SDK than
# 10.9. This is a temporary measure until nixpkgs darwin support is
# updated.
- patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
+ + stdenv.lib.optionalString stdenv.isDarwin ''
sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
+ ''
+ # Patch llvm-config to return correct library path based on --link-{shared,static}.
+ + stdenv.lib.optionalString (enableSharedLibraries) ''
+ substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
+ patch -p1 < ./llvm-outputs.patch
'';
# hacky fix: created binaries need to be run before installation
@@ -59,9 +74,10 @@ in stdenv.mkDerivation rec {
"-DLLVM_LINK_LLVM_DYLIB=ON"
] ++ stdenv.lib.optional (!isDarwin)
"-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
- ++ stdenv.lib.optionals ( isDarwin) [
+ ++ stdenv.lib.optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
+ "-DCMAKE_LIBTOOL=${darwin.cctools}/bin/libtool"
];
postBuild = ''
@@ -70,9 +86,20 @@ in stdenv.mkDerivation rec {
paxmark m bin/{lli,llvm-rtdyld}
'';
- postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
- install_name_tool -id $out/lib/libLLVM.dylib $out/lib/libLLVM.dylib
- ln -s $out/lib/libLLVM.dylib $out/lib/libLLVM-${version}.dylib
+ postInstall = ""
+ + stdenv.lib.optionalString (enableSharedLibraries) ''
+ moveToOutput "lib/libLLVM-*" "$lib"
+ moveToOutput "lib/libLLVM.${shlib}" "$lib"
+ substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \
+ --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
+ ''
+ + stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+ substituteInPlace "$out/lib/cmake/llvm/LLVMExports-release.cmake" \
+ --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
+ install_name_tool -id $lib/lib/libLLVM.dylib $lib/lib/libLLVM.dylib
+ install_name_tool -change @rpath/libLLVM.dylib $lib/lib/libLLVM.dylib $out/bin/llvm-config
+ ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+ ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${version}.dylib
'';
enableParallelBuilding = true;
diff --git a/pkgs/development/compilers/manticore/builder.sh b/pkgs/development/compilers/manticore/builder.sh
index 8fb4ab850eb1..ad72f50a1b31 100755
--- a/pkgs/development/compilers/manticore/builder.sh
+++ b/pkgs/development/compilers/manticore/builder.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@shell@
source $stdenv/setup
echo "Building Manticore research compiler."
diff --git a/pkgs/development/compilers/mezzo/default.nix b/pkgs/development/compilers/mezzo/default.nix
index 67e7c932e555..79dc479fae83 100644
--- a/pkgs/development/compilers/mezzo/default.nix
+++ b/pkgs/development/compilers/mezzo/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, menhir, yojson, ulex, pprint, fix, functory }:
+{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, yojson, ulex, pprint, fix, functory }:
let
check-ocaml-version = with stdenv.lib; versionAtLeast (getVersion ocaml);
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
sha256 = "0yck5r6di0935s3iy2mm9538jkf77ssr789qb06ms7sivd7g3ip6";
};
- buildInputs = [ ocaml findlib yojson menhir ulex pprint fix functory ];
+ buildInputs = [ ocaml findlib ocamlbuild yojson menhir ulex pprint fix functory ];
# Sets warning 3 as non-fatal
prePatch = stdenv.lib.optionalString (check-ocaml-version "4.02") ''
diff --git a/pkgs/development/compilers/mono/llvm.nix b/pkgs/development/compilers/mono/llvm.nix
index de9339bb8a28..1036e43ea941 100644
--- a/pkgs/development/compilers/mono/llvm.nix
+++ b/pkgs/development/compilers/mono/llvm.nix
@@ -41,7 +41,6 @@ stdenv.mkDerivation rec {
postBuild = "rm -fR $out";
cmakeFlags = with stdenv; [
- "-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_BINUTILS_INCDIR=${binutils.dev}/include"
"-DCMAKE_CXX_FLAGS=-std=c++11"
diff --git a/pkgs/development/compilers/nim/default.nix b/pkgs/development/compilers/nim/default.nix
index eef60bcd9675..0dfdea6d3d14 100644
--- a/pkgs/development/compilers/nim/default.nix
+++ b/pkgs/development/compilers/nim/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, unzip }:
stdenv.mkDerivation rec {
- name = "nim-0.14.2";
+ name = "nim-0.15.2";
src = fetchurl {
url = "http://nim-lang.org/download/${name}.tar.xz";
- sha256 = "14jy7wza54jawja21r6v676qyj0i9kg1jpn5bxwn8wfm1vbki3cg";
+ sha256 = "12pyzjx7x4hclzrf3zf6r1qjlp60bzsaqrz0rax2rak2c8qz4pch";
};
buildPhase = "sh build.sh";
diff --git a/pkgs/development/compilers/obliv-c/default.nix b/pkgs/development/compilers/obliv-c/default.nix
new file mode 100644
index 000000000000..f1f9a38a198f
--- /dev/null
+++ b/pkgs/development/compilers/obliv-c/default.nix
@@ -0,0 +1,33 @@
+{stdenv, fetchurl, ocaml, libgcrypt, fetchFromGitHub, ocamlPackages, perl}:
+stdenv.mkDerivation rec {
+ name = "obliv-c-${version}";
+ version = "0.0pre20161001";
+ buildInputs = [ ocaml ocamlPackages.findlib perl ];
+ propagatedBuildInputs = [ libgcrypt ];
+ src = fetchFromGitHub {
+ owner = "samee";
+ repo = "obliv-c";
+ rev = "32d71fb46983aded604045e8cda7874d8fb160a2";
+ sha256 = "05bicvalsfabngvf41q02bcyzkibmyihj7naqd53kdq75xa1yf37";
+ };
+ preInstall = ''
+ mkdir -p "$out/bin"
+ cp bin/* "$out/bin"
+ mkdir -p "$out/share/doc/obliv-c"
+ cp -r doc/* README* CHANGE* Change* LICEN* TODO* "$out/share/doc/obliv-c"
+ mkdir -p "$out/share/obliv-c"
+ cp -r test "$out/share/obliv-c"
+ mkdir -p "$out/include"
+ cp src/ext/oblivc/*.h "$out/include"
+ mkdir -p "$out/lib"
+ gcc $(ar t _build/libobliv.a | sed -e 's@^@_build/@') --shared -o _build/libobliv.so
+ cp _build/lib*.a _build/lib*.so* "$out/lib"
+ '';
+ meta = {
+ inherit version;
+ description = ''A GCC wrapper that makes it easy to embed secure computation protocols inside regular C programs'';
+ license = stdenv.lib.licenses.bsd3;
+ maintainers = [stdenv.lib.maintainers.raskin];
+ platforms = stdenv.lib.platforms.linux;
+ };
+}
diff --git a/pkgs/development/compilers/opa/default.nix b/pkgs/development/compilers/opa/default.nix
index 2e691dc749d5..a69694778442 100644
--- a/pkgs/development/compilers/opa/default.nix
+++ b/pkgs/development/compilers/opa/default.nix
@@ -63,5 +63,8 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.gpl3;
maintainers = [ stdenv.lib.maintainers.kkallio ];
platforms = with stdenv.lib.platforms; linux;
+ # opa was built with nodejs 0.10 which reached end of LTS
+ # in October 216, it doesn't built with nodejs 4.x
+ broken = true;
};
}
diff --git a/pkgs/development/compilers/openjdk/8.nix b/pkgs/development/compilers/openjdk/8.nix
index 50199852ae2f..d0933b9a1950 100644
--- a/pkgs/development/compilers/openjdk/8.nix
+++ b/pkgs/development/compilers/openjdk/8.nix
@@ -1,8 +1,11 @@
-{ stdenv, fetchurl, cpio, pkgconfig, file, which, unzip, zip, xorg, cups, freetype
-, alsaLib, bootjdk, cacert, perl, liberation_ttf, fontconfig, zlib
+{ stdenv, lib, fetchurl, 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
@@ -19,41 +22,41 @@ let
throw "openjdk requires i686-linux or x86_64 linux";
update = "122";
- build = "00";
+ build = "04";
baseurl = "http://hg.openjdk.java.net/jdk8u/jdk8u";
repover = "jdk8u${update}-b${build}";
paxflags = if stdenv.isi686 then "msp" else "m";
jdk8 = fetchurl {
url = "${baseurl}/archive/${repover}.tar.gz";
- sha256 = "0biy2xpb6krinmpj5pqsz0vryd2m6i819csvqnv88rc3750qh13d";
+ sha256 = "1zqqy5gzrx7f438j5pjdavj41plb04p6b1ikspksrgnhs5wrrr02";
};
langtools = fetchurl {
url = "${baseurl}/langtools/archive/${repover}.tar.gz";
- sha256 = "1wy9n64fvxybpd8lqd2zbiv2z23nfp10bd098lhqw7z46yxbm3ra";
+ sha256 = "0hhsm23mxvjxmf0jxlhm57s203k88s8xbmk71l8zlnjsz88ni4gx";
};
hotspot = fetchurl {
url = "${baseurl}/hotspot/archive/${repover}.tar.gz";
- sha256 = "1hzliyjaz0dq7l934d16c3ddx6kiszl2hkc2cs0rhb09m7q4zcv7";
+ sha256 = "1r4a52brsg1xd2dc2b8lzd4w4yvcjdmj9a6avjihx1hpgcs4xzd1";
};
corba = fetchurl {
url = "${baseurl}/corba/archive/${repover}.tar.gz";
- sha256 = "0576r009my434fgv9m7lwd5bvvgbb182aw8z8fwwbi36mf5j3sr5";
+ sha256 = "0ixa6kdqkiq83817qdymiy772449iva11rh3pr68qpfnmbx1zzil";
};
jdk = fetchurl {
url = "${baseurl}/jdk/archive/${repover}.tar.gz";
- sha256 = "1hn40jm2fcs037zx30k1gxw6j24hr50a78zjjaaql73yhhzf74xh";
+ sha256 = "1kw4h3j93cvnlzh0vhj4xxdm90bk7hfg6kpqk09x0a12whh2ww3h";
};
jaxws = fetchurl {
url = "${baseurl}/jaxws/archive/${repover}.tar.gz";
- sha256 = "1lbvaw3ck0inz9376qh9nw8d1ys93plfpsn1sp9mmwdjyglvznif";
+ sha256 = "0wrj3jyv3922m3pxfg0i9c3ap71b0rass7swvhi996c029rd12r7";
};
jaxp = fetchurl {
url = "${baseurl}/jaxp/archive/${repover}.tar.gz";
- sha256 = "11viwry7fj70wgzfbpslb6j1zpqqzicdf8yyqhw3whf7l6wx2bav";
+ sha256 = "0b743mygzdavdd59l98b3l6a03dihs4ipd1xlpkacy778wzpr59d";
};
nashorn = fetchurl {
url = "${baseurl}/nashorn/archive/${repover}.tar.gz";
- sha256 = "057g393kjb9via2a3x3zm7r4g9dslw0nkwn6yppzd8hal325s1wa";
+ sha256 = "10wkshhzj15wvx7i53dbkwi85f4fbbxi26zphr5b6daf3ib0hind";
};
openjdk8 = stdenv.mkDerivation {
name = "openjdk-8u${update}b${build}";
@@ -65,10 +68,11 @@ let
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
- cpio file which unzip zip
- xorg.libX11 xorg.libXt xorg.libXext xorg.libXrender xorg.libXtst
- xorg.libXi xorg.libXinerama xorg.libXcursor xorg.lndir
- cups freetype alsaLib perl liberation_ttf fontconfig bootjdk zlib
+ 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
];
prePatch = ''
@@ -82,10 +86,12 @@ let
./fix-java-home-jdk8.patch
./read-truststore-from-env-jdk8.patch
./currency-date-range-jdk8.patch
- ] ++ (if enableInfinality then [
+ ] ++ lib.optionals (!minimal && enableInfinality) [
./004_add-fontconfig.patch
./005_enable-infinality.patch
- ] else []);
+ ] ++ lib.optionals (!minimal && enableGnome2) [
+ ./swing-use-gtk.patch
+ ];
preConfigure = ''
chmod +x configure
@@ -101,21 +107,22 @@ let
"--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\""
- ] ++ (if minimal then [
- "--disable-headful"
- "--with-zlib=bundled"
- "--with-giflib=bundled"
- ] else [
- "--with-zlib=system"
- ]);
+ ] ++ lib.optional minimal "--disable-headful";
- NIX_LDFLAGS= if minimal then null else "-lfontconfig";
+ 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";
+ buildFlags = [ "all" ];
installPhase = ''
mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk
@@ -135,12 +142,19 @@ let
# Remove crap from the installation.
rm -rf $out/lib/openjdk/demo $out/lib/openjdk/sample
+ ${lib.optionalString minimal ''
+ rm $out/lib/openjdk/jre/lib/${architecture}/{libjsound,libjsoundalsa,libsplashscreen,libawt*,libfontmanager}.so
+ rm $out/lib/openjdk/jre/bin/policytool
+ rm $out/lib/openjdk/bin/{policytool,appletviewer}
+ ''}
# Move the JRE to a separate output and setup fallback fonts
mv $out/lib/openjdk/jre $jre/lib/openjdk/
mkdir $out/lib/openjdk/jre
- mkdir -p $jre/lib/openjdk/jre/lib/fonts/fallback
- lndir ${liberation_ttf}/share/fonts/truetype $jre/lib/openjdk/jre/lib/fonts/fallback
+ ${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
+ ''}
lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre
rm -rf $out/lib/openjdk/jre/bina
diff --git a/pkgs/development/compilers/openjdk/swing-use-gtk.patch b/pkgs/development/compilers/openjdk/swing-use-gtk.patch
new file mode 100644
index 000000000000..9538aade6726
--- /dev/null
+++ b/pkgs/development/compilers/openjdk/swing-use-gtk.patch
@@ -0,0 +1,26 @@
+diff -ru3 a/jdk/src/share/classes/javax/swing/UIManager.java b/jdk/src/share/classes/javax/swing/UIManager.java
+--- a/jdk/src/share/classes/javax/swing/UIManager.java 2016-07-26 00:41:37.000000000 +0300
++++ b/jdk/src/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/jdk8cpu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
index f1b27bdb54f9..e8d737e0082a 100644
--- a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
@@ -1,9 +1,9 @@
import ./jdk-linux-base.nix {
productVersion = "8";
- patchVersion = "101";
+ patchVersion = "111";
downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html;
- sha256_i686 = "0p9nvaifb1mn7scmprbcyv9a4lyqy8i0mf7rsb59cli30vpi44mi";
- sha256_x86_64 = "0a0kb3c7xfh81vx5sicw2frgxq0gyv5qp0d725rviwldlcxk4zs6";
+ sha256_i686 = "07wyyds52c3fp4ha1fnzp6mbxwq0rs3vx59167b57gkggg7qz3ls";
+ sha256_x86_64 = "0x4937c3307v78wx1jf227b89cf5lsd5yarmbjrxs4pq6lidlzhq";
jceName = "jce_policy-8.zip";
jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
diff --git a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
index b760ac7135a4..fc2e6448fc3f 100644
--- a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
@@ -1,9 +1,9 @@
import ./jdk-linux-base.nix {
productVersion = "8";
- patchVersion = "102";
+ patchVersion = "112";
downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html;
- sha256_i686 = "1bsypgf9va8jds0rlpnwp9n9p11hz77gqlmb0b0w2qwfmlmi227d";
- sha256_x86_64 = "1dq4kqi8k2k11sc28fnbp6cmncfj86jv57iy1gkap94i0fyf1yvw";
+ sha256_i686 = "19b9vwb7bd17s9p04y47zzjkccazzmpy4dqx4rgxd79k1fw2yz0y";
+ sha256_x86_64 = "19blsx81x5p2f6d9vig89z7cc8778cp6qdjy9ylsa2444vaxfyvp";
jceName = "jce_policy-8.zip";
jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
diff --git a/pkgs/development/compilers/pakcs/adjust-buildsystem.patch b/pkgs/development/compilers/pakcs/adjust-buildsystem.patch
new file mode 100644
index 000000000000..2d1f92af81df
--- /dev/null
+++ b/pkgs/development/compilers/pakcs/adjust-buildsystem.patch
@@ -0,0 +1,21 @@
+diff -Naur pakcs-1.11.4-upstream/scripts/pakcs.sh pakcs-1.11.4/scripts/pakcs.sh
+--- pakcs-1.11.4-upstream/scripts/pakcs.sh 2014-10-24 05:06:07.000000000 -0430
++++ pakcs-1.11.4/scripts/pakcs.sh 2015-01-05 16:26:15.697982791 -0430
+@@ -16,7 +16,7 @@
+ # use readline wrapper rlwrap if it is installed and we have tty as stdin:
+ USERLWRAP=no
+ if tty -s ; then
+- RLWRAP=`which rlwrap`
++ RLWRAP=`type -P rlwrap`
+ if [ -x "$RLWRAP" ] ; then
+ USERLWRAP=yes
+ fi
+@@ -29,7 +29,7 @@
+ done
+
+ if [ $USERLWRAP = yes ] ; then
+- exec rlwrap -c -f "$PAKCSHOME/tools/rlwrap" "$REPL" ${1+"$@"}
++ exec rlwrap -a -c -f "$PAKCSHOME/tools/rlwrap" "$REPL" ${1+"$@"}
+ else
+ exec "$REPL" ${1+"$@"}
+ fi
diff --git a/pkgs/development/compilers/pakcs/case-insensitive.patch b/pkgs/development/compilers/pakcs/case-insensitive.patch
new file mode 100644
index 000000000000..e46558c25208
--- /dev/null
+++ b/pkgs/development/compilers/pakcs/case-insensitive.patch
@@ -0,0 +1,19 @@
+--- www/Makefile.orig 2016-10-10 21:04:36.000000000 +0300
++++ pakcs-1.14.0/www/Makefile 2016-10-10 21:07:56.000000000 +0300
+@@ -6,7 +6,7 @@ all: submitform Registry
+ submitform: SubmitForm.curry $(LIBDIR)/HtmlCgi.curry \
+ $(LIBDIR)/NamedSocket.curry $(LIBDIR)/CPNS.curry
+ $(REPL) $(REPL_OPTS) :load SubmitForm :save :q
+- mv SubmitForm submitform
++ mv SubmitForm submitform.orig && mv submitform.orig submitform
+
+ Registry: Registry.curry $(LIBDIR)/HtmlCgi.curry
+ $(REPL) $(REPL_OPTS) :load Registry :save :q
+--- currytools/erd2curry/Makefile.orig 2016-10-10 21:13:49.000000000 +0300
++++ pakcs-1.14.0/currytools/erd2curry/Makefile 2016-10-10 21:21:14.000000000 +0300
+@@ -32,4 +32,4 @@ uninstall: clean
+ erd2curry: $(DEPS)
+ # create saved state for top-level function "main":
+ $(REPL) $(REPL_OPTS) :load ERD2Curry :save "main \"$(CURDIR)\"" :q
+- mv ERD2Curry $@
++ mv ERD2Curry $@.orig && mv $@.orig $@
diff --git a/pkgs/development/compilers/pakcs/default.nix b/pkgs/development/compilers/pakcs/default.nix
new file mode 100644
index 000000000000..084a0941d24e
--- /dev/null
+++ b/pkgs/development/compilers/pakcs/default.nix
@@ -0,0 +1,159 @@
+{ stdenv, fetchurl, swiProlog, haskellPackages
+, glibcLocales, makeWrapper, rlwrap, tk, which }:
+
+let
+ fname = "pakcs-1.14.0";
+
+ fsrc = fetchurl {
+ url = "http://www.informatik.uni-kiel.de/~pakcs/download/${fname}-src.tar.gz";
+ sha256 = "1651ssh4ql79x8asd7kp4yis2n5rhn3lml4s26y03b0cgbfhs78s";
+ };
+
+ swiPrologLocked = stdenv.lib.overrideDerivation swiProlog (oldAttrs: rec {
+ version = "6.6.6";
+ name = "swi-prolog-${version}";
+ src = fetchurl {
+ url = "http://www.swi-prolog.org/download/stable/src/pl-${version}.tar.gz";
+ sha256 = "0vcrfskm2hyhv30lxr6v261myb815jc3bgmcn1lgsc9g9qkvp04z";
+ };
+ });
+
+in
+stdenv.mkDerivation rec {
+
+ name = fname;
+
+ curryBase = haskellPackages.callPackage (
+ { mkDerivation, base, Cabal, containers, directory, either
+ , filepath, mtl, pretty, stdenv, syb, time
+ }:
+ mkDerivation {
+ pname = "curry-base";
+ version = "0.4.1";
+ src = fsrc;
+ libraryHaskellDepends = [
+ base containers directory either filepath mtl pretty syb time
+ ];
+ testHaskellDepends = [ base Cabal filepath mtl ];
+ homepage = "http://curry-language.org";
+ description = "Functions for manipulating Curry programs";
+ license = "unknown";
+
+ postUnpack = ''
+ mv ${name} ${name}.orig
+ ln -s ${name}.orig/frontend/curry-base ${name}
+ '';
+ doCheck = false;
+ }
+ ) {};
+
+ curryFront = haskellPackages.callPackage (
+ { mkDerivation, base, Cabal, containers, directory
+ , filepath, mtl, network-uri, process, stdenv, syb, transformers
+ }:
+ mkDerivation {
+ pname = "curry-frontend";
+ version = "0.4.1";
+ src = fsrc;
+ isLibrary = true;
+ isExecutable = true;
+ libraryHaskellDepends = [
+ base containers curryBase directory filepath mtl network-uri
+ process syb transformers
+ ];
+ executableHaskellDepends = [
+ base containers curryBase directory filepath mtl network-uri
+ process syb transformers
+ ];
+ testHaskellDepends = [ base Cabal curryBase filepath ];
+ homepage = "http://curry-language.org";
+ description = "Compile the functional logic language Curry to several intermediate formats";
+ license = "unknown";
+
+ postUnpack = ''
+ mv ${name} ${name}.orig
+ ln -s ${name}.orig/frontend/curry-frontend ${name}
+ '';
+ doCheck = false;
+ }
+ ) {};
+
+ src = fsrc;
+
+ buildInputs = [ swiPrologLocked makeWrapper glibcLocales rlwrap tk which ];
+
+ patches = [
+ ./adjust-buildsystem.patch
+ ./case-insensitive.patch
+ ];
+
+ configurePhase = ''
+ # Phony HOME.
+ mkdir phony-home
+ export HOME=$(pwd)/phony-home
+
+ # SWI Prolog
+ sed -i 's@SWIPROLOG=@SWIPROLOG='${swiPrologLocked}/bin/swipl'@' scripts/pakcsinitrc.sh
+ '';
+
+ buildPhase = ''
+ # Some comments in files are in UTF-8, so include the locale needed by GHC runtime.
+ export LC_ALL=en_US.UTF-8
+
+ # PAKCS must be build in place due to embedded filesystem references placed by swi.
+
+ # Prepare PAKCSHOME directory.
+ mkdir -p $out/pakcs/bin
+
+ # Set up link to cymake, which has been built already.
+ ln -s ${curryFront}/bin/cymake $out/pakcs/bin/
+ rm -r frontend
+
+ # Prevent embedding the derivation build directory as temp.
+ export TEMP=/tmp
+
+ # Copy to in place build location and run the build.
+ cp -r * $out/pakcs
+ (cd $out/pakcs ; make)
+ '';
+
+ installPhase = ''
+ # Install bin.
+ mkdir -p $out/bin
+ for b in $(ls $out/pakcs/bin) ; do
+ ln -s $out/pakcs/bin/$b $out/bin/ ;
+ done
+
+ # Place emacs lisp files in expected locations.
+ mkdir -p $out/share/emacs/site-lisp/curry-pakcs
+ for e in "$out/pakcs/tools/emacs/"*.el ; do
+ cp $e $out/share/emacs/site-lisp/curry-pakcs/ ;
+ done
+
+ # Wrap for rlwrap and tk support.
+ wrapProgram $out/pakcs/bin/pakcs \
+ --prefix PATH ":" "${rlwrap}/bin" \
+ --prefix PATH ":" "${tk}/bin" \
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = "http://www.informatik.uni-kiel.de/~pakcs/";
+ description = "An implementation of the multi-paradigm declarative language Curry";
+ license = licenses.bsd3;
+
+ longDescription = ''
+ PAKCS is an implementation of the multi-paradigm declarative language
+ Curry jointly developed by the Portland State University, the Aachen
+ University of Technology, and the University of Kiel. Although this is
+ not a highly optimized implementation but based on a high-level
+ compilation of Curry programs into Prolog programs, it is not a toy
+ implementation but has been used for a variety of applications (e.g.,
+ graphical programming environments, an object-oriented front-end for
+ Curry, partial evaluators, database applications, HTML programming
+ with dynamic web pages, prototyping embedded systems).
+ '';
+
+ maintainers = with maintainers; [ kkallio gnidorah ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/pkgs/development/compilers/ponyc/default.nix b/pkgs/development/compilers/ponyc/default.nix
index 93ce5037fed0..122b9ff7ed1a 100644
--- a/pkgs/development/compilers/ponyc/default.nix
+++ b/pkgs/development/compilers/ponyc/default.nix
@@ -1,16 +1,19 @@
-{stdenv, glibc, fetchFromGitHub, llvm, makeWrapper, openssl, pcre2, coreutils }:
+{ stdenv, fetchFromGitHub, llvm, makeWrapper, pcre2, coreutils, which, libressl,
+ cc ? stdenv.cc, lto ? !stdenv.isDarwin }:
-stdenv.mkDerivation {
- name = "ponyc-2016-07-26";
+stdenv.mkDerivation ( rec {
+ name = "ponyc-${version}";
+ version = "0.6.0";
src = fetchFromGitHub {
owner = "ponylang";
repo = "ponyc";
- rev = "4eec8a9b0d9936b2a0249bd17fd7a2caac6aaa9c";
- sha256 = "184x2jivp7826i60rf0dpx0a9dg5rsj56dv0cll28as4nyqfmna2";
+ rev = version;
+ sha256 = "10miwsyxl589b0n1h3dbbc2qckq8z8a58s0d53asq88w2gpc339q";
};
- buildInputs = [ llvm makeWrapper ];
+ buildInputs = [ llvm makeWrapper which ];
+ propagatedBuildInputs = [ cc ];
# Disable problematic networking tests
patches = [ ./disable-tests.patch ];
@@ -18,37 +21,69 @@ stdenv.mkDerivation {
preBuild = ''
# Fix tests
substituteInPlace packages/process/_test.pony \
- --replace "/bin/cat" "${coreutils}/bin/cat"
+ --replace '"/bin/' '"${coreutils}/bin/'
+ substituteInPlace packages/process/_test.pony \
+ --replace '=/bin' "${coreutils}/bin"
+
+
+ # Fix llvm-ar check for darwin
+ substituteInPlace Makefile \
+ --replace "llvm-ar-3.8" "llvm-ar"
+
+ # Remove impure system refs
+ substituteInPlace src/libponyc/pkg/package.c \
+ --replace "/usr/local/lib" ""
+ substituteInPlace src/libponyc/pkg/package.c \
+ --replace "/opt/local/lib" ""
+
+ for file in `grep -irl '/usr/local/opt/libressl/lib' ./*`; do
+ substituteInPlace $file --replace '/usr/local/opt/libressl/lib' "${stdenv.lib.getLib libressl}/lib"
+ done
+
+ # Fix ponypath issue
+ substituteInPlace Makefile \
+ --replace "PONYPATH=." "PONYPATH=.:\$(PONYPATH)"
export LLVM_CONFIG=${llvm}/bin/llvm-config
+ '' + stdenv.lib.optionalString ((!stdenv.isDarwin) && (!cc.isClang) && lto) ''
+ export LTO_PLUGIN=`find ${cc.cc}/ -name liblto_plugin.so`
+ '' + stdenv.lib.optionalString ((!stdenv.isDarwin) && (cc.isClang) && lto) ''
+ export LTO_PLUGIN=`find ${cc.cc}/ -name LLVMgold.so`
'';
- makeFlags = [ "config=release" ];
+ makeFlags = [ "config=release" ] ++ stdenv.lib.optionals stdenv.isDarwin [ "bits=64" ]
+ ++ stdenv.lib.optionals (stdenv.isDarwin && (!lto)) [ "lto=no" ];
enableParallelBuilding = true;
doCheck = true;
- checkTarget = "test";
+ checkTarget = "test-ci";
preCheck = ''
- export LIBRARY_PATH="$out/lib:${stdenv.lib.makeLibraryPath [ openssl pcre2 ]}"
+ export PONYPATH="$out/lib:${stdenv.lib.makeLibraryPath [ pcre2 libressl ]}"
'';
installPhase = ''
- make config=release prefix=$out install
+ make config=release prefix=$out ''
+ + stdenv.lib.optionalString stdenv.isDarwin '' bits=64 ''
+ + stdenv.lib.optionalString (stdenv.isDarwin && (!lto)) '' lto=no ''
+ + '' install
mv $out/bin/ponyc $out/bin/ponyc.wrapped
makeWrapper $out/bin/ponyc.wrapped $out/bin/ponyc \
- --prefix LIBRARY_PATH : "$out/lib" \
- --prefix LIBRARY_PATH : "${openssl.out}/lib" \
- --prefix LIBRARY_PATH : "${pcre2}/lib"
+ --prefix PONYPATH : "$out/lib" \
+ --prefix PONYPATH : "${stdenv.lib.getLib pcre2}/lib" \
+ --prefix PONYPATH : "${stdenv.lib.getLib libressl}/lib"
'';
+ # Stripping breaks linking for ponyc
+ dontStrip = true;
+
meta = {
description = "Pony is an Object-oriented, actor-model, capabilities-secure, high performance programming language";
homepage = http://www.ponylang.org;
license = stdenv.lib.licenses.bsd2;
maintainers = [ stdenv.lib.maintainers.doublec ];
- platforms = stdenv.lib.platforms.linux;
+ platforms = stdenv.lib.platforms.unix;
};
-}
+})
diff --git a/pkgs/development/compilers/ponyc/disable-tests.patch b/pkgs/development/compilers/ponyc/disable-tests.patch
index 9335ebd6eea8..696dc005f0ab 100644
--- a/pkgs/development/compilers/ponyc/disable-tests.patch
+++ b/pkgs/development/compilers/ponyc/disable-tests.patch
@@ -1,16 +1,15 @@
diff --git a/packages/net/_test.pony b/packages/net/_test.pony
-index d6c3e56..dc37dd9 100644
+index ce26bd7..9a98cc7 100644
--- a/packages/net/_test.pony
+++ b/packages/net/_test.pony
-@@ -7,11 +7,6 @@ actor Main is TestList
+@@ -5,9 +5,7 @@ actor Main is TestList
+ new make() => None
+
fun tag tests(test: PonyTest) =>
- test(_TestReadBuffer)
- test(_TestWriteBuffer)
- test(_TestBroadcast)
-- ifdef not windows then
-- test(_TestTCPExpect)
-- test(_TestTCPWritev)
-- end
-
- class iso _TestReadBuffer is UnitTest
- """
+- test(_TestTCPWritev)
+- test(_TestTCPExpect)
++ None
+
+ class _TestPing is UDPNotify
+ let _h: TestHelper
diff --git a/pkgs/development/compilers/ponyc/pony-stable.nix b/pkgs/development/compilers/ponyc/pony-stable.nix
new file mode 100644
index 000000000000..cd4859acec21
--- /dev/null
+++ b/pkgs/development/compilers/ponyc/pony-stable.nix
@@ -0,0 +1,26 @@
+{stdenv, fetchFromGitHub, ponyc }:
+
+stdenv.mkDerivation {
+ name = "pony-stable-2016-10-10";
+
+ src = fetchFromGitHub {
+ owner = "jemc";
+ repo = "pony-stable";
+ rev = "fdefa26fed93f4ff81c323f29abd47813c515703";
+ sha256 = "16inavy697icgryyvn9gcylgh639xxs7lnbrqdzcryvh0ck15qxk";
+ };
+
+ buildInputs = [ ponyc ];
+
+ installPhase = ''
+ make prefix=$out install
+ '';
+
+ meta = {
+ description = "A simple dependency manager for the Pony language.";
+ homepage = http://www.ponylang.org;
+ license = stdenv.lib.licenses.bsd2;
+ maintainers = [ stdenv.lib.maintainers.dipinhora ];
+ platforms = stdenv.lib.platforms.unix;
+ };
+}
diff --git a/pkgs/development/compilers/rust/bootstrap.nix b/pkgs/development/compilers/rust/bootstrap.nix
index e7cc7b15627e..454b67b8151b 100644
--- a/pkgs/development/compilers/rust/bootstrap.nix
+++ b/pkgs/development/compilers/rust/bootstrap.nix
@@ -17,13 +17,13 @@ let
# fetch hashes by running `print-hashes.sh 1.9.0`
bootstrapHash =
if stdenv.system == "i686-linux"
- then "be93dd2b80a97f2877679950d56990628c6547b953294f16bf6d69c18a39edc0"
+ then "f5a3f5d53defe827a71447b1a0e7a656394b87ee23e009d7bf73a0277c1b5ac2"
else if stdenv.system == "x86_64-linux"
- then "f189303d52b37c8bb694b9d9739ae73ffa926cbdeffde1d5d6a5c6e811940293"
+ then "f4ebbd6d9494cb8fa6c410cb58954e1913546c2bca8963faebc424591547d83f"
else if stdenv.system == "i686-darwin"
- then "40d4782a58dd5bef22dbbaa7a363f3b42f844628db07205f6435ac934f350061"
+ then "bf07182bc362985fcdd48af905cdb559e20c68518cd71dabec3c30b78ca8a94a"
else if stdenv.system == "x86_64-darwin"
- then "4bb71249f4afd7cee07f63d681f9fcb1b525ee3dfd49722adab7a40024e45af7"
+ then "2cdbc47438dc86ecaf35298317b77d735956eb160862e3f6d0fda0da656ecc35"
else throw "missing boostrap hash for platform ${stdenv.system}";
needsPatchelf = stdenv.isLinux;
@@ -33,7 +33,7 @@ let
sha256 = bootstrapHash;
};
- version = "1.10.0";
+ version = "1.11.0";
in
rec {
diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix
index b7e992c916d3..7e29435b7d59 100644
--- a/pkgs/development/compilers/rust/default.nix
+++ b/pkgs/development/compilers/rust/default.nix
@@ -7,12 +7,12 @@ in
rec {
rustc = callPackage ./rustc.nix {
- shortVersion = "1.11.0";
+ shortVersion = "1.12.1";
isRelease = true;
forceBundledLLVM = false;
configureFlags = [ "--release-channel=stable" ];
- srcRev = "9b21dcd6a89f38e8ceccb2ede8c9027cb409f6e3";
- srcSha = "12djpxhwqvq3262ai9vd096bvriynci2mrwn0dfjrd0w6s0i8viy";
+ srcRev = "d4f39402a0c2c2b94ec0375cd7f7f6d7918113cd";
+ srcSha = "1lpykjy96rwz4jy28rf7ijca0q9lvckgnbzvcdsrspd5rs2ywfwr";
patches = [
./patches/disable-lockfile-check.patch
@@ -25,10 +25,10 @@ rec {
};
cargo = callPackage ./cargo.nix rec {
- version = "0.12.0";
- srcRev = "6b98d1f8abf5b33c1ca2771d3f5f3bafc3407b93";
- srcSha = "0pq6l3yzmh2il6320f6501hvp9iikdxzl34i5b52v93ncpim36bk";
- depsSha256 = "1jrwzm9fd15kf2d5zb17q901hx32h711ivcwdpxpmzwq08sjlcvl";
+ version = "0.13.0";
+ srcRev = "109cb7c33d426044d141457049bd0fffaca1327c";
+ srcSha = "0p79m7hpzjh36l4fc6a59h6r8yz6qafjcdg5v1yb7bac9m2wi7vs";
+ depsSha256 = "1cwp4p8b985fj8j2qmgsi2mpp51rdpwzm9qa60760nrry1fy624z";
inherit rustc; # the rustc that will be wrapped by cargo
inherit rustPlatform; # used to build cargo
diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix
index f8f0e6df0d84..e1bff12f398e 100644
--- a/pkgs/development/compilers/rust/rustc.nix
+++ b/pkgs/development/compilers/rust/rustc.nix
@@ -90,8 +90,18 @@ stdenv.mkDerivation {
# Disable fragile linker-output-non-utf8 test
rm -vr src/test/run-make/linker-output-non-utf8/
+ # Remove test targeted at LLVM 3.9 - https://github.com/rust-lang/rust/issues/36835
+ rm -vr src/test/run-pass/issue-36023.rs
+
# Useful debugging parameter
# export VERBOSE=1
+ '' +
+ # In src/compiler-rt/cmake/config-ix.cmake, the cmake build falls
+ # back to darwin 10.4. This causes the OS name to be recorded as
+ # "10.4" rather than the expected "osx". But mk/rt.mk expects the
+ # built library name to have an "_osx" suffix on darwin.
+ optionalString stdenv.isDarwin ''
+ substituteInPlace mk/rt.mk --replace "_osx" "_10.4"
'';
preConfigure = ''
@@ -118,7 +128,13 @@ stdenv.mkDerivation {
preCheck = ''
export TZDIR=${tzdata}/share/zoneinfo
- ${optionalString stdenv.isDarwin "export TMPDIR=/tmp"}
+ '' +
+ # Ensure TMPDIR is set, and disable a test that removing the HOME
+ # variable from the environment falls back to another home
+ # directory.
+ optionalString stdenv.isDarwin ''
+ export TMPDIR=/tmp
+ sed -i '28s/home_dir().is_some()/true/' ./src/test/run-pass/env-home-dir.rs
'';
# Disable doCheck on Darwin to work around upstream issue
diff --git a/pkgs/development/compilers/scala/default.nix b/pkgs/development/compilers/scala/default.nix
index d452d0abe300..a1b131eac817 100644
--- a/pkgs/development/compilers/scala/default.nix
+++ b/pkgs/development/compilers/scala/default.nix
@@ -1,11 +1,11 @@
{ stdenv, fetchurl, makeWrapper, jre }:
stdenv.mkDerivation rec {
- name = "scala-2.11.8";
+ name = "scala-2.12.0";
src = fetchurl {
url = "http://www.scala-lang.org/files/archive/${name}.tgz";
- sha256 = "1khs7673wca7gnxz2rxphv6v5k94jkpcarlqznsys9cpknhqdz47";
+ sha256 = "148wmk7gjiyfms9lrwgiky7vw78pwnvpnx71rg4l30zd6jfiknp9";
};
propagatedBuildInputs = [ jre ] ;
diff --git a/pkgs/development/compilers/shaderc/default.nix b/pkgs/development/compilers/shaderc/default.nix
new file mode 100644
index 000000000000..df0c136d05f5
--- /dev/null
+++ b/pkgs/development/compilers/shaderc/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub, cmake, glslang, spirv-tools, python }:
+
+stdenv.mkDerivation rec {
+ name = "shaderc-git-${version}";
+ version = "2016-09-08";
+
+ # `vulkan-loader` requires a specific version of `glslang` as specified in
+ # `<vulkan-loader-repo>/glslang_revision`.
+ src = fetchFromGitHub {
+ owner = "google";
+ repo = "shaderc";
+ rev = "e17bb8ba3b8b0b9142b788d988612a40541c54ce";
+ sha256 = "17qfjqkz6j355qi130kixaz51svl09k9b5sfikksgnbmzglzcwki";
+ };
+
+ patchPhase = ''
+ cp -r ${spirv-tools.src} third_party/spirv-tools
+ chmod -R +w third_party/spirv-tools
+ ln -s ${spirv-tools.headers} third_party/spirv-tools/external/spirv-headers
+ '';
+
+ buildInputs = [ cmake glslang python ];
+ enableParallelBuilding = true;
+
+ cmakeFlags = [ "-DSHADERC_SKIP_TESTS=ON" "-DSHADERC_GLSLANG_DIR=${glslang.src}" ];
+
+ meta = with stdenv.lib; {
+ inherit (src.meta) homepage;
+ description = "A collection of tools, libraries and tests for shader compilation.";
+ };
+}
diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix
index 463481a15476..40d7ef064323 100644
--- a/pkgs/development/compilers/solc/default.nix
+++ b/pkgs/development/compilers/solc/default.nix
@@ -1,16 +1,20 @@
{ stdenv, fetchFromGitHub, boost, cmake, jsoncpp }:
stdenv.mkDerivation rec {
- version = "0.3.6";
+ version = "0.4.2";
name = "solc-${version}";
src = fetchFromGitHub {
owner = "ethereum";
repo = "solidity";
rev = "v${version}";
- sha256 = "1cynqwy8wr63l3l4wv9z6shhcy6lq0q8pbsh3nav0dg9qgj9sg57";
+ sha256 = "1d5x3psz8a9z9jnm30aspfvrpd9kblr14cn5vyl21p27x2vdlzr4";
};
+ patchPhase = ''
+ echo >commit_hash.txt af6afb0415761b53721f89c7f65064807f41cbd3
+ '';
+
buildInputs = [ boost cmake jsoncpp ];
meta = {
diff --git a/pkgs/development/compilers/swi-prolog/default.nix b/pkgs/development/compilers/swi-prolog/default.nix
index b6d6388c74b9..79f7e5256b21 100644
--- a/pkgs/development/compilers/swi-prolog/default.nix
+++ b/pkgs/development/compilers/swi-prolog/default.nix
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, gmp, readline, openssl, libjpeg, unixODBC, zlib
, libXinerama, libXft, libXpm, libSM, libXt, freetype, pkgconfig
-, fontconfig
+, fontconfig, makeWrapper ? stdenv.isDarwin
}:
let
@@ -15,7 +15,8 @@ stdenv.mkDerivation {
};
buildInputs = [ gmp readline openssl libjpeg unixODBC libXinerama
- libXft libXpm libSM libXt zlib freetype pkgconfig fontconfig ];
+ libXft libXpm libSM libXt zlib freetype pkgconfig fontconfig ]
+ ++ stdenv.lib.optional stdenv.isDarwin makeWrapper;
hardeningDisable = [ "format" ];
@@ -23,12 +24,24 @@ stdenv.mkDerivation {
buildFlags = "world";
+ # For macOS: still not fixed in upstream: "abort trap 6" when called
+ # through symlink, so wrap binary.
+ # We reinvent wrapProgram here but omit argv0 pass in order to not
+ # break PAKCS package build. This is also safe for SWI-Prolog, since
+ # there is no wrapping environment and hence no need to spoof $0
+ postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
+ local prog="$out/bin/swipl"
+ local hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
+ mv $prog $hidden
+ makeWrapper $hidden $prog
+ '';
+
meta = {
homepage = http://www.swi-prolog.org/;
description = "A Prolog compiler and interpreter";
license = "LGPL";
- platforms = stdenv.lib.platforms.linux;
+ platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.peti ];
};
}
diff --git a/pkgs/development/compilers/vala/0.23.nix b/pkgs/development/compilers/vala/0.23.nix
deleted file mode 100644
index 13b9c5f39832..000000000000
--- a/pkgs/development/compilers/vala/0.23.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
- major = "0.23";
- minor = "2";
- sha256 = "0g22ss9qbm3fqhx4fxhsyfmdc5g1hgdw4dz9d37f4489kl0qf8pl";
-in
-stdenv.mkDerivation rec {
- name = "vala-${major}.${minor}";
-
- meta = {
- description = "Compiler for GObject type system";
- homepage = "http://live.gnome.org/Vala";
- license = stdenv.lib.licenses.lgpl21Plus;
- platforms = stdenv.lib.platforms.unix;
- maintainers = with stdenv.lib.maintainers; [ antono ];
- };
-
- src = fetchurl {
- url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
- inherit sha256;
- };
-
- nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
- buildInputs = [ glib libiconv ]
- ++ libintlOrEmpty;
-}
diff --git a/pkgs/development/compilers/vala/0.26.nix b/pkgs/development/compilers/vala/0.26.nix
deleted file mode 100644
index 78cb850c3565..000000000000
--- a/pkgs/development/compilers/vala/0.26.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
- major = "0.26";
- minor = "2";
- sha256 = "37f13f430c56a93b6dac85239084681fd8f31c407d386809c43bc2f2836e03c4";
-in
-stdenv.mkDerivation rec {
- name = "vala-${major}.${minor}";
-
- meta = {
- description = "Compiler for GObject type system";
- homepage = "http://live.gnome.org/Vala";
- license = stdenv.lib.licenses.lgpl21Plus;
- platforms = stdenv.lib.platforms.unix;
- maintainers = with stdenv.lib.maintainers; [ antono lethalman ];
- };
-
- src = fetchurl {
- url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
- inherit sha256;
- };
-
- nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
- buildInputs = [ glib libiconv ]
- ++ libintlOrEmpty;
-}
diff --git a/pkgs/development/compilers/vala/0.28.nix b/pkgs/development/compilers/vala/0.28.nix
deleted file mode 100644
index caec4fda8873..000000000000
--- a/pkgs/development/compilers/vala/0.28.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
- major = "0.28";
- minor = "0";
- sha256 = "0zwpzhkhfk3piya14m7p2hl2vaabahprphppfm46ci91z39kp7hd";
-in
-stdenv.mkDerivation rec {
- name = "vala-${major}.${minor}";
-
- meta = {
- description = "Compiler for GObject type system";
- homepage = "http://live.gnome.org/Vala";
- license = stdenv.lib.licenses.lgpl21Plus;
- platforms = stdenv.lib.platforms.unix;
- maintainers = with stdenv.lib.maintainers; [ antono lethalman ];
- };
-
- src = fetchurl {
- url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
- inherit sha256;
- };
-
- nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
- buildInputs = [ glib libiconv ]
- ++ libintlOrEmpty;
-}
diff --git a/pkgs/development/compilers/vala/0.32.nix b/pkgs/development/compilers/vala/0.32.nix
deleted file mode 100644
index 202b9fff6c80..000000000000
--- a/pkgs/development/compilers/vala/0.32.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
-, glib, libiconv, libintlOrEmpty
-}:
-
-let
- major = "0.32";
- minor = "1";
- sha256 = "1ab1l44abf9fj1wznzq5956431ia136rl5049cggnk5393jlf3fx";
-in
-stdenv.mkDerivation rec {
- name = "vala-${major}.${minor}";
-
- meta = {
- description = "Compiler for GObject type system";
- homepage = "http://live.gnome.org/Vala";
- license = stdenv.lib.licenses.lgpl21Plus;
- platforms = stdenv.lib.platforms.unix;
- maintainers = with stdenv.lib.maintainers; [ antono lethalman ];
- };
-
- src = fetchurl {
- url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
- inherit sha256;
- };
-
- nativeBuildInputs = [ pkgconfig flex bison libxslt ];
-
- buildInputs = [ glib libiconv ]
- ++ libintlOrEmpty;
-
-}
diff --git a/pkgs/development/compilers/vala/default.nix b/pkgs/development/compilers/vala/default.nix
new file mode 100644
index 000000000000..b0153a754032
--- /dev/null
+++ b/pkgs/development/compilers/vala/default.nix
@@ -0,0 +1,61 @@
+{ stdenv, fetchurl, pkgconfig, flex, bison, libxslt
+, glib, libiconv, libintlOrEmpty
+}:
+
+let
+ generic = { major, minor, sha256 }:
+ stdenv.mkDerivation rec {
+ name = "vala-${major}.${minor}";
+
+ src = fetchurl {
+ url = "mirror://gnome/sources/vala/${major}/${name}.tar.xz";
+ inherit sha256;
+ };
+
+ nativeBuildInputs = [ pkgconfig flex bison libxslt ];
+
+ buildInputs = [ glib libiconv ] ++ libintlOrEmpty;
+
+ meta = with stdenv.lib; {
+ description = "Compiler for GObject type system";
+ homepage = "http://live.gnome.org/Vala";
+ license = licenses.lgpl21Plus;
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ antono lethalman peterhoeg ];
+ };
+ };
+
+in rec {
+
+ vala_0_23 = generic {
+ major = "0.23";
+ minor = "2";
+ sha256 = "0g22ss9qbm3fqhx4fxhsyfmdc5g1hgdw4dz9d37f4489kl0qf8pl";
+ };
+
+ vala_0_26 = generic {
+ major = "0.26";
+ minor = "2";
+ sha256 = "1i03ds1z5hivqh4nhf3x80fg7n0zd22908w5minkpaan1i1kzw9p";
+ };
+
+ vala_0_28 = generic {
+ major = "0.28";
+ minor = "0";
+ sha256 = "0zwpzhkhfk3piya14m7p2hl2vaabahprphppfm46ci91z39kp7hd";
+ };
+
+ vala_0_32 = generic {
+ major = "0.32";
+ minor = "1";
+ sha256 = "1ab1l44abf9fj1wznzq5956431ia136rl5049cggnk5393jlf3fx";
+ };
+
+ vala_0_34 = generic {
+ major = "0.34";
+ minor = "1";
+ sha256 = "16cjybjw100qps6jg0jdyjh8hndz8a876zmxpybnf30a8vygrk7m";
+ };
+
+ vala = vala_0_34;
+}