Merge master into x-updates

Adds the mass-rebuilding python update.
This commit is contained in:
Vladimír Čunát
2014-07-02 22:54:20 +02:00
292 changed files with 3987 additions and 897 deletions

View File

@@ -12,13 +12,16 @@ stdenv.mkDerivation rec {
buildInputs = [ coq ocaml ocamlPackages.menhir ];
enableParallelBuilding = true;
configurePhase = "./configure -prefix $out -toolprefix ${gcc}/bin/ ia32-linux";
configurePhase = "./configure -prefix $out -toolprefix ${gcc}/bin/ " +
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
meta = {
description = "Formally verified C compiler";
homepage = "http://compcert.inria.fr";
license = stdenv.lib.licenses.inria;
platforms = [ "i686-linux" ];
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
platforms = stdenv.lib.platforms.linux ++
stdenv.lib.platforms.darwin;
maintainers = [ stdenv.lib.maintainers.thoughtpolice
stdenv.lib.maintainers.jwiegley ];
};
}

View File

@@ -0,0 +1,19 @@
http://code.google.com/p/go/source/detail?r=8b13b2ec6b18
--- a/src/cmd/cgo/gcc.go 2014-07-02 12:00:12.171796197 +0200
+++ b/src/cmd/cgo/gcc.go 2014-07-02 12:01:57.844472754 +0200
@@ -840,6 +840,15 @@
func (p *Package) gccErrors(stdin []byte) string {
// TODO(rsc): require failure
args := p.gccCmd()
+
+ // GCC 4.8.0 has a bug: it sometimes does not apply
+ // -Wunused-value to values that are macros defined in system
+ // headers. See issue 5118. Adding -Wsystem-headers avoids
+ // that problem. This will produce additional errors, but it
+ // doesn't matter because we will ignore all errors that are
+ // not marked for the cgo-test file.
+ args = append(args, "-Wsystem-headers")
+
if *debugGcc {
fmt.Fprintf(os.Stderr, "$ %s <<EOF\n", strings.Join(args, " "))
os.Stderr.Write(stdin)

View File

@@ -0,0 +1,12 @@
https://code.google.com/p/go-wiki/wiki/OlderVersions
--- a/src/cmd/cc/funct.c 2014-07-02 11:54:42.230663598 +0200
+++ b/src/cmd/cc/funct.c 2014-07-02 11:55:01.653790128 +0200
@@ -269,7 +269,7 @@
goto bad;
f = alloc(sizeof(*f));
- for(o=0; o<sizeof(f->sym); o++)
+ for(o=0; o<nelem(f->sym); o++)
f->sym[o] = S;
t->funct = f;

View File

@@ -51,7 +51,7 @@ stdenv.mkDerivation {
sed -i '/TestHostname/areturn' src/pkg/os/os_test.go
'';
patches = [ ./cacert.patch ];
patches = [ ./cacert.patch ./1_0-opt-error.patch ./1_0-gcc-bug.patch ];
GOOS = "linux";
GOARCH = if stdenv.system == "i686-linux" then "386"

View File

@@ -0,0 +1,175 @@
{ productVersion
, patchVersion
, downloadUrl
, sha256_i686
, sha256_x86_64
, jceName
, jceDownloadUrl
, sha256JCE
}:
{ swingSupport ? true
, stdenv
, requireFile
, unzip
, file
, xlibs ? null
, installjdk ? true
, pluginSupport ? true
, installjce ? false
, glib
, libxml2
, libav_0_8
, ffmpeg
, libxslt
, mesa_noglu
, freetype
, fontconfig
, gnome
, cairo
, alsaLib
, atk
, gdk_pixbuf
}:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
assert swingSupport -> xlibs != null;
let
/**
* The JRE libraries are in directories that depend on the CPU.
*/
architecture =
if stdenv.system == "i686-linux" then
"i386"
else if stdenv.system == "x86_64-linux" then
"amd64"
else
abort "jdk requires i686-linux or x86_64 linux";
jce =
if installjce then
requireFile {
name = jceName;
url = jceDownloadUrl;
sha256 = sha256JCE;
}
else
"";
in
stdenv.mkDerivation rec {
name =
if installjdk then "jdk-1.${productVersion}.0_${patchVersion}" else "jre-1.${productVersion}.0_${patchVersion}";
src =
if stdenv.system == "i686-linux" then
requireFile {
name = "jdk-${productVersion}u${patchVersion}-linux-i586.tar.gz";
url = downloadUrl;
sha256 = sha256_i686;
}
else if stdenv.system == "x86_64-linux" then
requireFile {
name = "jdk-${productVersion}u${patchVersion}-linux-x64.tar.gz";
url = downloadUrl;
sha256 = sha256_x86_64;
}
else
abort "jdk requires i686-linux or x86_64 linux";
nativeBuildInputs = [ file ]
++ stdenv.lib.optional installjce unzip;
# See: https://github.com/NixOS/patchelf/issues/10
dontStrip = 1;
installPhase = ''
cd ..
# Set PaX markings
exes=$(file $sourceRoot/bin/* $sourceRoot/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
for file in $exes; do
paxmark m "$file"
# On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
${stdenv.lib.optionalString stdenv.isi686 ''paxmark msp "$file"''}
done
if test -z "$installjdk"; then
mv $sourceRoot/jre $out
else
mv $sourceRoot $out
fi
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
if test -n "$installjdk"; then
for file in $out/jre/*
do
if test -f $file ; then
rm $file
fi
done
fi
# construct the rpath
rpath=
for i in $libraries; do
rpath=$rpath''${rpath:+:}$i/lib:$i/lib64
done
if test -z "$installjdk"; then
jrePath=$out
else
jrePath=$out/jre
fi
if test -n "${jce}"; then
unzip ${jce}
cp -v UnlimitedJCEPolicy/*.jar $jrePath/lib/security
fi
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/jli
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/server
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/xawt
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}
# set all the dynamic linkers
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
if test -z "$pluginSupport"; then
rm -f $out/bin/javaws
if test -n "$installjdk"; then
rm -f $out/jre/bin/javaws
fi
fi
mkdir $jrePath/lib/${architecture}/plugins
ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
'';
inherit installjdk pluginSupport;
/**
* libXt is only needed on amd64
*/
libraries =
[stdenv.gcc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf atk] ++
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.gcc.gcc] else []);
passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
meta.license = "unfree";
}

View File

@@ -1,170 +1,10 @@
{ swingSupport ? true
, stdenv
, requireFile
, unzip
, file
, xlibs ? null
, installjdk ? true
, pluginSupport ? true
, installjce ? false
, glib
, libxml2
, libav_0_8
, ffmpeg
, libxslt
, mesa_noglu
, freetype
, fontconfig
, gnome
, cairo
, alsaLib
, atk
, gdk_pixbuf
}:
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
assert swingSupport -> xlibs != null;
let
/**
* The JRE libraries are in directories that depend on the CPU.
*/
architecture =
if stdenv.system == "i686-linux" then
"i386"
else if stdenv.system == "x86_64-linux" then
"amd64"
else
abort "jdk requires i686-linux or x86_64 linux";
jce =
if installjce then
requireFile {
name = "UnlimitedJCEPolicyJDK7.zip";
url = http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html;
sha256 = "7a8d790e7bd9c2f82a83baddfae765797a4a56ea603c9150c87b7cdb7800194d";
}
else
"";
in
stdenv.mkDerivation rec {
patchversion = "55";
name =
if installjdk then "jdk-1.7.0_${patchversion}" else "jre-1.7.0_${patchversion}";
src =
if stdenv.system == "i686-linux" then
requireFile {
name = "jdk-7u${patchversion}-linux-i586.tar.gz";
url = http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html;
sha256 = "0y0v5ilbkdmf14jrvwa23x91rfdw90jji4y7hq0l494iy4wjnyc1";
}
else if stdenv.system == "x86_64-linux" then
requireFile {
name = "jdk-7u${patchversion}-linux-x64.tar.gz";
url = http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html;
sha256 = "15sncxhjasv5i6p7hfrr92xq5ph9g6g12i4m52vp45l031bw5y46";
}
else
abort "jdk requires i686-linux or x86_64 linux";
nativeBuildInputs = [ file ]
++ stdenv.lib.optional installjce unzip;
installPhase = ''
cd ..
# Set PaX markings
exes=$(file $sourceRoot/bin/* $sourceRoot/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
for file in $exes; do
paxmark m "$file"
# On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
${stdenv.lib.optionalString stdenv.isi686 ''paxmark msp "$file"''}
done
if test -z "$installjdk"; then
mv $sourceRoot/jre $out
else
mv $sourceRoot $out
fi
for file in $out/*
do
if test -f $file ; then
rm $file
fi
done
if test -n "$installjdk"; then
for file in $out/jre/*
do
if test -f $file ; then
rm $file
fi
done
fi
# construct the rpath
rpath=
for i in $libraries; do
rpath=$rpath''${rpath:+:}$i/lib''${rpath:+:}$i/lib64
done
if test -z "$installjdk"; then
jrePath=$out
else
jrePath=$out/jre
fi
if test -n "${jce}"; then
unzip ${jce}
cp -v UnlimitedJCEPolicy/*.jar $jrePath/lib/security
fi
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/jli
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/server
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/xawt
rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}
# set all the dynamic linkers
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
# HACK: For some reason, appending atk to the global patchelf rpath paths causes:
# java: relocation error: java: symbol , version GLIBC_2.2.5 not defined in file libc.so.6 with link time reference
# Because only libglass.so needs atk, we put it only in it's rpath.
# This seems to work fine.
test -f $out/jre/lib/${architecture}/libglass.so && patchelf --set-rpath "$rpath:${atk}/lib" $out/jre/lib/${architecture}/libglass.so
if test -z "$pluginSupport"; then
rm -f $out/bin/javaws
if test -n "$installjdk"; then
rm -f $out/jre/bin/javaws
fi
fi
mkdir $jrePath/lib/${architecture}/plugins
ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
'';
inherit installjdk pluginSupport;
/**
* libXt is only needed on amd64
*/
libraries =
[stdenv.gcc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu xlibs.libXxf86vm alsaLib fontconfig freetype gnome.pango gnome.gtk cairo gdk_pixbuf] ++
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.gcc.gcc] else []);
passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
meta.license = "unfree";
import ./jdk-linux-base.nix {
productVersion = "7";
patchVersion = "60";
downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html;
sha256_i686 = "d736fb4fd7c8ef50b76411daa640c6feeb48a5c275d29a90ffeb916a78d47a48";
sha256_x86_64 = "c7232b717573b057dbe828d937ee406b7a75fbc6aba7f1de98a049cbd42c6ae8";
jceName = "UnlimitedJCEPolicyJDK7.zip";
jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html;
sha256JCE = "7a8d790e7bd9c2f82a83baddfae765797a4a56ea603c9150c87b7cdb7800194d";
}

View File

@@ -0,0 +1,10 @@
import ./jdk-linux-base.nix {
productVersion = "8";
patchVersion = "5";
downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html;
sha256_i686 = "779f83efb8dc9ce7c1143ba9bbd38fa2d8a1c49dcb61f7d36972d37d109c5fc9";
sha256_x86_64 = "44901389e9fb118971534ad0f58558ba8c43f315b369117135bd6617ae631edc";
jceName = "jce_policy-8.zip";
jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
sha256JCE = "f3020a3922efd6626c2fff45695d527f34a8020e938a49292561f18ad1320b59";
}

View File

@@ -1,11 +1,12 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "nasm-2.11.01";
name = "nasm-${version}";
version = "2.11.05";
src = fetchurl {
url = "http://www.nasm.us/pub/nasm/releasebuilds/2.11.01/${name}.tar.bz2";
sha256 = "0p0rhq18in2hyv3gircgxj72n2b1mvr8bvjlqscpaz8m62cyvam7";
url = "http://www.nasm.us/pub/nasm/releasebuilds/${version}/${name}.tar.bz2";
sha256 = "1sgspnascc0asmwlv3jm1mq4vzx653sa7vlg48z20pfybk7pnhaa";
};
meta = {

View File

@@ -3,11 +3,11 @@
# at runtime, need jre or jdk
stdenv.mkDerivation rec {
name = "scala-2.9.2";
name = "scala-2.9.3";
src = fetchurl {
url = "http://www.scala-lang.org/downloads/distrib/files/${name}.tgz";
sha256 = "0s1shpzw2hyz7bwxdqq19rcrzbpq4d7b0kvdvjvhy7h05x496b46";
url = "http://www.scala-lang.org/files/archive/${name}.tgz";
sha256 = "faaab229f78c945063e8fd31c045bc797c731194296d7a4f49863fd87fc4e7b9";
};
installPhase = ''

View File

@@ -0,0 +1,43 @@
{ stdenv, fetchurl, cpio, rsync, makeWrapper }:
stdenv.mkDerivation rec {
name = "smlnj-bootstrap-${version}";
version = "110.76";
src = fetchurl {
url = "http://smlnj.cs.uchicago.edu/dist/working/${version}/smlnj-x86-${version}.pkg";
sha256 = "0n3kdlqffqw97piya7i4lddrhjml2dp1q9hfq2jrd2hbzln8vdjf";
};
buildInputs = [ cpio rsync makeWrapper ];
unpackPhase = ''
/usr/bin/xar -xf $src
cd smlnj.pkg
'';
buildPhase = ''
cat Payload | gunzip -dc | cpio -i
'';
installPhase = ''
ensureDir $out/bin
rsync -av bin/ $out/bin/
ensureDir $out/lib
rsync -av lib/ $out/lib/
'';
postInstall = ''
wrapProgram "$out/bin/sml" --set "SMLNJ_HOME" "$out"
'';
meta = {
description = "Compiler for the Standard ML '97 programming language";
homepage = http://www.smlnj.org;
license = stdenv.lib.licenses.free;
platforms = stdenv.lib.platforms.darwin;
maintainers = [ stdenv.lib.maintainers.jwiegley ];
};
}