Merge branch 'master' into closure-size

TODO: there was more significant refactoring of qtbase and plasma 5.5
on master, and I'm deferring pointing to correct outputs to later.
This commit is contained in:
Vladimír Čunát
2015-12-31 09:47:26 +01:00
951 changed files with 117997 additions and 19014 deletions

View File

@@ -0,0 +1,40 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "cmdstan-2.9.0";
src = fetchurl {
url = "https://github.com/stan-dev/cmdstan/releases/download/v2.9.0/cmdstan-2.9.0.tar.gz";
sha256 = "08bim6nxgam989152hm0ga1rfb33mr71pwsym1nmfmavma68bwm9";
};
buildFlags = "build";
enableParallelBuilding = true;
doCheck = true;
checkPhase = "./runCmdStanTests.py src/test/interface";
installPhase = ''
mkdir -p $out/opt $out/bin
cp -r . $out/opt/cmdstan
ln -s $out/opt/cmdstan/bin/stanc $out/bin/stanc
ln -s $out/opt/cmdstan/bin/stansummary $out/bin/stansummary
cat > $out/bin/stan <<EOF
#!/bin/sh
make -C $out/opt/cmdstan "\$(realpath "\$1")"
EOF
chmod a+x $out/bin/stan
'';
meta = {
description = "Command-line interface to Stan";
longDescription = ''
Stan is a probabilistic programming language implementing full Bayesian
statistical inference with MCMC sampling (NUTS, HMC), approximate Bayesian
inference with Variational inference (ADVI) and penalized maximum
likelihood estimation with Optimization (L-BFGS).
'';
homepage = http://mc-stan.org/interfaces/cmdstan.html;
license = stdenv.lib.licenses.bsd3;
};
}

View File

@@ -58,7 +58,7 @@ assert langGo -> langCC;
with stdenv.lib;
with builtins;
let version = "5.2.0";
let version = "5.3.0";
# Whether building a cross-compiler for GNU/Hurd.
crossGNU = cross != null && cross.config == "i586-pc-gnu";
@@ -211,7 +211,7 @@ stdenv.mkDerivation ({
src = fetchurl {
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
sha256 = "1bccp8a106xwz3wkixn65ngxif112vn90qf95m6lzpgpnl25p0sz";
sha256 = "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq";
};
inherit patches;

View File

@@ -4,16 +4,10 @@
let
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
''}
'';
docFixes = fetchurl {
url = "https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3a.patch";
sha256 = "1j45z4kcd3w1rzm4hapap2xc16bbh942qnzzdbdjcwqznsccznf0";
};
in
@@ -26,12 +20,16 @@ stdenv.mkDerivation rec {
sha256 = "1vsgmic8csczl62ciz51iv8nhrkm72lyhbz7p7id13y2w7fcx46g";
};
patches = [
docFixes
./dont-pass-linker-flags-via-response-files.patch # https://github.com/NixOS/nixpkgs/issues/10752
];
buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour ];
enableParallelBuilding = true;
preConfigure = ''
echo >mk/build.mk "${buildMK}"
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
@@ -42,6 +40,9 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-gcc=${stdenv.cc}/bin/cc"
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
"--with-curses-includes=${ncurses}/include" "--with-curses-libraries=${ncurses}/lib"
] ++ stdenv.lib.optional stdenv.isDarwin [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -0,0 +1,22 @@
diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
index 8c3ab1a..47a2da7 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -414,7 +414,7 @@ runCc dflags args = do
args1 = map Option (getOpts dflags opt_c)
args2 = args0 ++ args1 ++ args
mb_env <- getGccEnv args2
- runSomethingResponseFile dflags cc_filter "C Compiler" p args2 mb_env
+ runSomethingFiltered dflags cc_filter "C Compiler" p args2 mb_env
where
-- discard some harmless warnings from gcc that we can't turn off
cc_filter = unlines . doFilter . lines
@@ -928,7 +928,7 @@ runLink dflags args = do
args1 = map Option (getOpts dflags opt_l)
args2 = args0 ++ linkargs ++ args1 ++ args
mb_env <- getGccEnv args2
- runSomethingResponseFile dflags ld_filter "Linker" p args2 mb_env
+ runSomethingFiltered dflags ld_filter "Linker" p args2 mb_env
where
ld_filter = case (platformOS (targetPlatform dflags)) of
OSSolaris2 -> sunos_ld_filter

View File

@@ -1,32 +1,22 @@
{ stdenv, fetchgit, ghc, perl, gmp, ncurses, libiconv, autoconf, automake, happy, alex }:
let
buildMK = ''
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib"
libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include"
libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.lib}/lib"
DYNAMIC_BY_DEFAULT = NO
${stdenv.lib.optionalString stdenv.isDarwin ''
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
''}
'';
in
{ stdenv, fetchgit, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils
, autoconf, automake, happy, alex
}:
stdenv.mkDerivation rec {
version = "7.11.20150828";
version = "7.11.20151216";
name = "ghc-${version}";
rev = "38c98e4f61a48084995a5347d76ddd024ce1a09c";
rev = "28638dfe79e915f33d75a1b22c5adce9e2b62b97";
src = fetchgit {
url = "git://git.haskell.org/ghc.git";
inherit rev;
sha256 = "0wnxrfzjpjcmsmd2i0zg30jg7zpw1rrfwz8r56g314l7xcns6yp1";
sha256 = "0rjzkzn0hz1vdnjikcbwfs5ggs8r3y4gqxfdn4jzfp45gx94wiwv";
};
patches = [
./dont-pass-linker-flags-via-response-files.patch # https://github.com/NixOS/nixpkgs/issues/10752
];
postUnpack = ''
pushd ghc-${builtins.substring 0 7 rev}
echo ${version} >VERSION
@@ -38,24 +28,40 @@ stdenv.mkDerivation rec {
buildInputs = [ ghc perl autoconf automake happy alex ];
enableParallelBuilding = true;
preConfigure = ''
echo >mk/build.mk "${buildMK}"
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
'';
configureFlags = [
"--with-gcc=${stdenv.cc}/bin/cc"
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.lib}/lib"
] ++ stdenv.lib.optional stdenv.isDarwin [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
];
enableParallelBuilding = true;
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
postInstall = ''
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/ghc
# Patch scripts to include "readelf" and "cat" in $PATH.
for i in "$out/bin/"*; do
test ! -h $i || continue
egrep --quiet '^#!' <(head -n 1 $i) || continue
sed -i -e '2i export PATH="$PATH:${binutils}/bin:${coreutils}/bin"' $i
done
'';
meta = {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";

View File

@@ -43,12 +43,12 @@ in
stdenv.mkDerivation rec {
pname = "julia";
version = "0.4.0";
version = "0.4.2";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/JuliaLang/${pname}/releases/download/v${version}/${name}.tar.gz";
sha256 = "00k53hzbawpqvmkkyzcvbmf1d0ycshzdqk19nwsifv1rmiwjj7ss";
sha256 = "04i5kjji5553lkdxz3wgflg1mav5ivwy2dascjy8jprqpq33aknk";
};
prePatch = ''

View File

@@ -1,12 +1,12 @@
{ stdenv, fetchurl, makeWrapper, jre, unzip, which }:
stdenv.mkDerivation rec {
version = "1.0.0-beta-3595";
version = "1.0.0-beta-4584";
name = "kotlin-${version}";
src = fetchurl {
url = "https://github.com/JetBrains/kotlin/releases/download/build-${version}/kotlin-compiler-${version}.zip";
sha256 = "1ed750a169a411349852a102d5a9c23aec656acb76d51018a4933741eb846fae";
sha256 = "191698784f4a1f769df14757bad40243293aa6bc3d8e906bfa0c80c3db0a1d2c";
};
propagatedBuildInputs = [ jre which ] ;
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
longDescription = ''
Kotlin is a statically typed language that targets the JVM and JavaScript.
It is a general-purpose language intended for industry use.
It is developed by a team at JetBrains although it is an OSS language
It is developed by a team at JetBrains although it is an OSS language
and has external contributors.
'';
homepage = http://kotlinlang.org/;

View File

@@ -22,6 +22,11 @@ let
in stdenv.mkDerivation rec {
name = "llvm-${version}";
patches = [
# Backport for Rust, remove when 3.7.1 is released
./r242372-fix-LLVMBuildLandingPad.patch
];
unpackPhase = ''
unpackFile ${src}
mv llvm-${version}.src llvm

View File

@@ -0,0 +1,60 @@
Index: llvm/bindings/ocaml/llvm/llvm_ocaml.c
===================================================================
--- llvm/bindings/ocaml/llvm/llvm_ocaml.c (revision 242371)
+++ llvm/bindings/ocaml/llvm/llvm_ocaml.c (revision 242372)
@@ -1745,7 +1745,7 @@
CAMLprim LLVMValueRef llvm_build_landingpad(LLVMTypeRef Ty, LLVMValueRef PersFn,
value NumClauses, value Name,
value B) {
- return LLVMBuildLandingPad(Builder_val(B), Ty, Int_val(NumClauses),
+ return LLVMBuildLandingPad(Builder_val(B), Ty, PersFn, Int_val(NumClauses),
String_val(Name));
}
Index: llvm/bindings/go/llvm/ir.go
===================================================================
--- llvm/bindings/go/llvm/ir.go (revision 242371)
+++ llvm/bindings/go/llvm/ir.go (revision 242372)
@@ -1731,7 +1731,7 @@
func (b Builder) CreateLandingPad(t Type, nclauses int, name string) (l Value) {
cname := C.CString(name)
defer C.free(unsafe.Pointer(cname))
- l.C = C.LLVMBuildLandingPad(b.C, t.C, C.unsigned(nclauses), cname)
+ l.C = C.LLVMBuildLandingPad(b.C, t.C, nil, C.unsigned(nclauses), cname)
return l
}
Index: llvm/lib/IR/Core.cpp
===================================================================
--- llvm/lib/IR/Core.cpp (revision 242371)
+++ llvm/lib/IR/Core.cpp (revision 242372)
@@ -2257,7 +2257,14 @@
}
LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
- unsigned NumClauses, const char *Name) {
+ LLVMValueRef PersFn, unsigned NumClauses,
+ const char *Name) {
+ // The personality used to live on the landingpad instruction, but now it
+ // lives on the parent function. For compatibility, take the provided
+ // personality and put it on the parent function.
+ if (PersFn)
+ unwrap(B)->GetInsertBlock()->getParent()->setPersonalityFn(
+ cast<Function>(unwrap(PersFn)));
return wrap(unwrap(B)->CreateLandingPad(unwrap(Ty), NumClauses, Name));
}
Index: llvm/include/llvm-c/Core.h
===================================================================
--- llvm/include/llvm-c/Core.h (revision 242371)
+++ llvm/include/llvm-c/Core.h (revision 242372)
@@ -2675,7 +2675,8 @@
LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
const char *Name);
LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
- unsigned NumClauses, const char *Name);
+ LLVMValueRef PersFn, unsigned NumClauses,
+ const char *Name);
LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn);
LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef);

View File

@@ -0,0 +1,3 @@
source "https://rubygems.org"
gem 'matter_compiler'

View File

@@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
matter_compiler (0.5.1)
PLATFORMS
ruby
DEPENDENCIES
matter_compiler
BUNDLED WITH
1.10.6

View File

@@ -0,0 +1,22 @@
{ stdenv, lib, bundlerEnv, ruby }:
bundlerEnv {
name = "matter_compiler-0.5.1";
inherit ruby;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
meta = with lib; {
description = ''
Matter Compiler is a API Blueprint AST Media Types to API Blueprint conversion tool.
It composes an API blueprint from its serialzed AST media-type.
'';
homepage = https://github.com/apiaryio/matter_compiler/;
license = licenses.mit;
maintainers = with maintainers; [ rvlander ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,9 @@
{
"matter_compiler" = {
version = "0.5.1";
source = {
type = "gem";
sha256 = "16501zdiqxk34v2d0nlbwrcrjm6g57hrsmsw0crwssn29v5zbykf";
};
};
}

View File

@@ -1,11 +1,11 @@
{ stdenv, callPackage }:
callPackage ./generic.nix {
shortVersion = "1.4.0";
shortVersion = "1.5.0";
isRelease = true;
forceBundledLLVM = false;
configureFlags = [ "--release-channel=stable" ];
srcSha = "13wpi9nb3h6wwck2mxhza85fahzcwgas00w8m25086v34dha4dp1";
srcSha = "1vfpwx6a2f2rn528774cz9r7r82ppycn8z8ybll6bphdw7cyar1g";
/* Rust is bootstrapped from an earlier built version. We need
to fetch these earlier versions, which vary per platform.
@@ -22,7 +22,6 @@ callPackage ./generic.nix {
snapshotDate = "2015-08-11";
snapshotRev = "1af31d4";
# cc-ar-opts.patch should be removable in 1.4.0+
patches = [ ./patches/remove-uneeded-git.patch ]
++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
}

View File

@@ -23,6 +23,6 @@ callPackage ./generic.nix {
snapshotRev = "1af31d4";
patches = [ ./patches/remove-uneeded-git.patch ]
++ stdenv.lib.optional stdenv.needsPax ./patches/grsec-head.patch;
++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
}

View File

@@ -1,24 +0,0 @@
diff --git a/src/test/run-make/relocation-model/Makefile b/src/test/run-make/relocation-model/Makefile
index b22f34f..c6489bd 100644
--- a/src/test/run-make/relocation-model/Makefile
+++ b/src/test/run-make/relocation-model/Makefile
@@ -2,9 +2,11 @@
all: others
$(RUSTC) -C relocation-model=dynamic-no-pic foo.rs
+ paxctl -czexm $(TMPDIR)/foo
$(call RUN,foo)
$(RUSTC) -C relocation-model=default foo.rs
+ paxctl -czexm $(TMPDIR)/foo
$(call RUN,foo)
$(RUSTC) -C relocation-model=default --crate-type=dylib foo.rs
@@ -16,6 +18,7 @@ others:
else
others:
$(RUSTC) -C relocation-model=static foo.rs
+ paxctl -czexm $(TMPDIR)/foo
$(call RUN,foo)
$(RUSTC) -C relocation-model=static --crate-type=dylib foo.rs
endif

View File

@@ -1,16 +1,24 @@
diff --git a/src/test/run-make/relocation-model/Makefile b/src/test/run-make/relocation-model/Makefile
index 2fcdd32..2d9ddb0 100644
index b22f34f..c6489bd 100644
--- a/src/test/run-make/relocation-model/Makefile
+++ b/src/test/run-make/relocation-model/Makefile
@@ -5,9 +5,11 @@ all:
@@ -2,9 +2,11 @@
all: others
$(RUSTC) -C relocation-model=dynamic-no-pic foo.rs
+ paxctl -czexm $(TMPDIR)/foo
$(call RUN,foo)
$(RUSTC) -C relocation-model=default foo.rs
+ paxctl -czexm $(TMPDIR)/foo
$(call RUN,foo)
$(RUSTC) -C relocation-model=default --crate-type=dylib foo.rs
@@ -16,6 +18,7 @@ others:
else
others:
$(RUSTC) -C relocation-model=static foo.rs
+ paxctl -czexm $(TMPDIR)/foo
$(call RUN,foo)
$(RUSTC) -C relocation-model=default --crate-type=dylib foo.rs
$(RUSTC) -C relocation-model=static --crate-type=dylib foo.rs
endif