Merge branch 'master' of github.com:nixos/nixpkgs into ryghcjs

Conflicts:
	pkgs/development/libraries/haskell/ghcjs-dom/default.nix
	pkgs/top-level/haskell-packages.nix
This commit is contained in:
Charles Strahan
2014-12-27 14:35:01 -05:00
1188 changed files with 22802 additions and 11008 deletions

View File

@@ -9,8 +9,8 @@
cabal.mkDerivation (self: {
pname = "Agda";
version = "2.4.2.1";
sha256 = "094x1rdhqxm630f0kgllhivgr1vdy4xrd9pgh737b1gbb2vf3awm";
version = "2.4.2.2";
sha256 = "1hxvapnvlkx6imifswc70ng869zll0zfsygivhc2mjyhaiv10i13";
isLibrary = true;
isExecutable = true;
buildDepends = [

View File

@@ -23,7 +23,7 @@ stdenv.mkDerivation {
do
wrapProgram $out/bin/$prog --set ALDORROOT $out \
--prefix PATH : ${openjdk}/bin \
--prefix PATH : ${stdenv.gcc}/bin ;
--prefix PATH : ${stdenv.cc}/bin ;
done
'';

View File

@@ -1,71 +0,0 @@
source $stdenv/setup
export CXXFLAGS="-m32"
tar zxvf "$gecodeSrc"
cd gecode-1.3.1
./configure --prefix="$out" --disable-minimodel --disable-examples
make
make install
cd ..
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:"$out"/lib/pkgconfig
tar zxvf "$seamSrc"
cd seam-1.4
./configure --prefix="$out" --with-zlib=$zlib
make
make install
cd ..
PATH=$PATH:"$out"/bin
tar zxvf "$aliceSrc"
cd alice-1.4
sed -i -e 's/bin\/bash/usr\/bin\/env bash/g' bin/alicerun.in
sed -i -e 's/bin\/bash/usr\/bin\/env bash/g' bin/aliceremote
./configure --prefix="$out" --with-gmp=$gmp
make
make install
cd ..
tar zxvf "$aliceGecodeSrc"
cd alice-gecode-1.4
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceRegexSrc"
cd alice-regex-1.4
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceSqliteSrc"
cd alice-sqlite-1.4
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceXmlSrc"
cd alice-xml-1.4
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceGtkSrc"
cd alice-gtk-1.4
sed -i -e 's/PRIVATE_GTK_LEAVE_PENDING/PRIVATE_GTK_HAS_POINTER/g' NativeGtk.cc
sed -i -e 's/bin\/bash/usr\/bin\/env bash/g' myinstall
make compiledll MUST_GENERATE=no
make installdll MUST_GENERATE=no
cd ..
tar zxvf "$aliceRuntimeSrc"
cd alice-runtime-1.4
./configure --prefix="$out"
make
make install
cd ..

View File

@@ -1,46 +1,13 @@
{stdenv, fetchurl, pkgsi686Linux, libtool, gnumake381, autoconf, automake111x, file, which, zsh, m4, pkgconfig, perl}:
{stdenv, gcc, glibc, fetchurl, fetchgit, libtool, autoconf, automake, file, gnumake, which, zsh, m4, pkgconfig, perl, gnome, pango, sqlite, libxml2, zlib, gmp, smlnj }:
stdenv.mkDerivation {
name = "aliceml-1.4";
name = "aliceml-1.4-493cd356";
aliceSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-1.4.tar.gz;
sha256 = "1ay8r26g7xm9zlrlpigp6y1zmrl93hzkndb5phx7651wx8j2183r";
};
aliceGecodeSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-gecode-1.4.tar.gz;
sha256 = "0yklpsqnm3wwzfz4vvv69dmm7q7pzpl3z7iw7wg33klng85cidl6";
};
aliceGtkSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-gtk-1.4.tar.gz;
sha256 = "0zx4ks0pk5wgbcsflcmn0kbpa9j7pjbsc19d1s3jgp4rwb24m1an";
};
aliceRegexSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-regex-1.4.tar.gz;
sha256 = "0myjzh3295awamghs4c88ypaa41m8sxh5jys876yq6flslw41s02";
};
aliceRuntimeSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-runtime-1.4.tar.gz;
sha256 = "1cbca71vh16l2h0zjvhgzzs0rzq99nc8nx9a97yzw595355nq57f";
};
aliceSqliteSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-sqlite-1.4.tar.gz;
sha256 = "0554xbx8zgqmpb7x06d7xvhlbk7bxmc237khgjs6yjcy53yf366b";
};
aliceXmlSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/alice-xml-1.4.tar.gz;
sha256 = "058a815a0vajjvjlsmd4ryx2bc71q6zwvyjg2c0v1gba2v3pddm0";
};
seamSrc = fetchurl {
url = http://www.ps.uni-saarland.de/alice/download/sources/seam-1.4.tar.gz;
sha256 = "1iz98jdv914whaw426d5406shlqgxqwpy3fbyb472x7d3lfra2dz";
src = fetchgit {
url = "https://github.com/aliceml/aliceml";
rev = "493cd3565f0bc3b35790185ec358fb91b7b43037";
sha256 = "12fbaf0a474e53f40a71f16bf61c52b7ffe044f4d0993e208e69552df3054d45";
fetchSubmodules = true;
};
gecodeSrc = fetchurl {
@@ -48,19 +15,32 @@ stdenv.mkDerivation {
sha256 = "0mgc6llbq166jmlq3alvagqsg3730670zvbwwkdgsqklw70v9355";
};
zlib = pkgsi686Linux.zlib;
gmp = pkgsi686Linux.gmp;
buildInputs = [
stdenv pkgsi686Linux.gcc34 pkgsi686Linux.glibc
libtool gnumake381 autoconf automake111x pkgsi686Linux.zlib
file which zsh pkgsi686Linux.gmp m4 pkgsi686Linux.gnome.gtk
pkgsi686Linux.gnome.libgnomecanvas pkgsi686Linux.pango pkgsi686Linux.sqlite
pkgsi686Linux.libxml2 pkgsi686Linux.lightning pkgconfig perl
stdenv gcc glibc
libtool gnumake autoconf automake
file which zsh m4 gnome.gtk zlib gmp
gnome.libgnomecanvas pango sqlite
libxml2 pkgconfig perl smlnj
];
builder = ./builder.sh;
makePatch = ./make.patch;
seamPatch = ./seam.patch;
phases = [ "unpackPhase" "patchPhase" "configurePhase" "buildPhase" ];
patchPhase = ''
sed -i -e "s@wget ..GECODE_URL. -O - | tar xz@tar xf $gecodeSrc@" make/Makefile
patch -p1 <$makePatch
patch -p1 <$seamPatch
'';
configurePhase = ''
make -C make setup PREFIX="$out"
'';
buildPhase = ''
gmp="${gmp}" zlib="${zlib}" PATH=$PATH:`pwd`/seam-support/install/bin make -C make all PREFIX="$out"
'';
meta = {
description = "Functional programming language based on Standard ML";
@@ -70,6 +50,7 @@ stdenv.mkDerivation {
programming.
'';
homepage = http://www.ps.uni-saarland.de/alice/;
license = "BSD";
license = stdenv.lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.doublec ];
};
}

View File

@@ -0,0 +1,20 @@
diff --git a/Makefile b/Makefile
index 6a55b06..84a6000 100644
--- a/make/Makefile
+++ b/make/Makefile
@@ -387,6 +387,7 @@ configure-seam-linux64:
../sources/configure \
--prefix='$(PREFIX)' \
--with-warnings=yes \
+ --with-zlib='$(zlib)' \
--disable-lightning)
.PHONY: configure-seam-darwin64
@@ -434,6 +435,7 @@ configure-alice-ll-linux:
(cd $(PWD)/alice/build && \
../sources/vm-seam/configure \
--prefix='$(PREFIX)' \
+ --with-gmp='$(gmp)' \
--with-warnings=yes)
.PHONY: rebuild-alice-ll

View File

@@ -0,0 +1,13 @@
diff --git a/Makefile.cvs b/Makefile.cvs
index b59434a..cd1316f 100644
--- a/seam/sources/Makefile.cvs
+++ b/seam/sources/Makefile.cvs
@@ -32,7 +32,7 @@ autotools:
aclocal -I .
autoconf
automake --add-missing
- cd libltdl; aclocal; autoconf; automake --add-missing
+ cd libltdl; chmod +w *; aclocal; autoconf; automake --add-missing
lightning:
rm -rf lightning

View File

@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
preConfigure =
# Help libgc's configure.
'' export CXXCPP="g++ -E"
'' export CXXCPP="$CXX -E"
'';
patchPhase = ''

View File

@@ -53,7 +53,7 @@ stdenv.mkDerivation {
for f in $out/bin/*
do
wrapProgram $f \
--prefix PATH : ${stdenv.gcc}/bin
--prefix PATH : ${stdenv.cc}/bin
done
'';
@@ -61,7 +61,7 @@ stdenv.mkDerivation {
meta = {
homepage = http://www.call-cc.org/;
license = "BSD";
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ the-kenny ];
platforms = with stdenv.lib.platforms; allBut darwin;
description = "A portable compiler for the Scheme programming language";

View File

@@ -24,7 +24,7 @@ stdenv.mkDerivation {
buildCommand = ''
mkdir -p $out
tar -C $out -xjf ${dist}
patchelf --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/bin/lisp
'';

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, coq, ocaml, ocamlPackages, gcc }:
{ stdenv, fetchurl, coq, ocaml, ocamlPackages }:
stdenv.mkDerivation rec {
name = "compcert-${version}";
@@ -12,7 +12,10 @@ stdenv.mkDerivation rec {
buildInputs = [ coq ocaml ocamlPackages.menhir ];
enableParallelBuilding = true;
configurePhase = "./configure -prefix $out -toolprefix ${gcc}/bin/ " +
configurePhase = ''
substituteInPlace ./configure --replace '{toolprefix}gcc' '{toolprefix}cc'
./configure -prefix $out -toolprefix ${stdenv.cc}/bin/ '' +
(if stdenv.isDarwin then "ia32-macosx" else "ia32-linux");
meta = with stdenv.lib; {

View File

@@ -10,12 +10,12 @@ let
jss-ver = "jss-0.4";
libPath = stdenv.lib.makeLibraryPath
[ stdenv.gcc.libc
stdenv.gcc.gcc
[ stdenv.cc.libc
stdenv.cc.gcc
gmp4
ncurses
zlib
] + ":${stdenv.gcc.gcc}/lib64";
] + ":${stdenv.cc.gcc}/lib64";
cryptol-bin =
if stdenv.system == "i686-linux"
@@ -94,12 +94,12 @@ stdenv.mkDerivation rec {
# Hack around lack of libtinfo in NixOS
ln -s ${ncurses}/lib/libncursesw.so.5.9 $out/lib/libtinfo.so.5
ln -s ${stdenv.gcc.libc}/lib/libpthread-2.19.so $out/lib/libpthread.so.0
ln -s ${stdenv.cc.libc}/lib/libpthread-2.19.so $out/lib/libpthread.so.0
'';
fixupPhase = ''
for x in bin/cryptol bin/edif2verilog bin/copy-iverilog bin/symbolic_netlist bin/jaig bin/vvp-galois bin/lss libexec/jss; do
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$out/lib:${libPath}" $out/$x
patchelf --shrink-rpath $out/$x
done

View File

@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
gtk2 glib fontconfig freetype unixODBC alsaLib
];
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64";
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64";
unpackPhase = ''
sh $src --keep --noexec
@@ -38,10 +38,10 @@ stdenv.mkDerivation rec {
buildPhase = ''
find . -type f -executable -exec patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
'{}' \; || true
find . -type f -exec patchelf \
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
--force-rpath \
'{}' \; || true
'';

View File

@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
gtk2 glib fontconfig freetype unixODBC alsaLib
];
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64";
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64";
unpackPhase = ''
sh $src --keep --noexec
@@ -38,10 +38,10 @@ stdenv.mkDerivation rec {
buildPhase = ''
find . -type f -executable -exec patchelf \
--set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
'{}' \; || true
find . -type f -exec patchelf \
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \
--set-rpath $rpath:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib \
--force-rpath \
'{}' \; || true
'';

View File

@@ -10,12 +10,12 @@ else
throw "Unsupported architecture";
edk2 = stdenv.mkDerivation {
name = "edk2-2014-02-01";
name = "edk2-2014-12-10";
src = fetchgit {
url = git://github.com/tianocore/edk2;
rev = "2818c158de6a164d012e6afb0fc145656aed4e4b";
sha256 = "a756b5de3a3e71d82ce1de8c7832bc69d2affb98d704894b26540571f9f5e214";
rev = "684a565a04";
sha256 = "1l46396f48v91z5b8lh3b0f0lcd7z5f86i1nrpc7l5gf7gx3117j";
};
buildInputs = [ libuuid pythonFull ];
@@ -33,8 +33,8 @@ edk2 = stdenv.mkDerivation {
meta = {
description = "Intel EFI development kit";
homepage = http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=EDK2;
license = "BSD";
homepage = http://sourceforge.net/projects/edk2/;
license = stdenv.lib.licenses.bsd2;
maintainers = [ stdenv.lib.maintainers.shlevy ];
platforms = ["x86_64-linux" "i686-linux"];
};

View File

@@ -17,7 +17,7 @@ let
buildInputs = [
fpc gtk glib libXi inputproto
libX11 xproto libXext xextproto pango atk
stdenv.gcc makeWrapper gdk_pixbuf
stdenv.cc makeWrapper gdk_pixbuf
];
in
stdenv.mkDerivation {

View File

@@ -7,17 +7,17 @@ mkdir $NIX_FIXINC_DUMMY
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; 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.
extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
extraCFlags="$(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=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
else
# Hack: support impure environments.

View File

@@ -14,11 +14,11 @@ if test "$noSysDirs" = "1"; then
# Figure out what extra flags to pass to the gcc compilers being
# generated to make sure that they use our glibc.
if test -e $NIX_GCC/nix-support/orig-glibc; then
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
if test -e $NIX_CC/nix-support/orig-glibc; then
glibc=$(cat $NIX_CC/nix-support/orig-glibc)
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
# source in $NIX_GCC/nix-support/add-flags, since that would
# source in $NIX_CC/nix-support/add-flags, since that would
# cause *this* GCC to be linked against the *previous* GCC.
# Need some more modularity there.
extraCFlags="-B$glibc/lib -isystem $glibc/include"

View File

@@ -12,17 +12,17 @@ export CPP="gcc -E"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; 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.
extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
extraCFlags="$(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=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
else
# Hack: support impure environments.

View File

@@ -17,20 +17,20 @@ fi
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; 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_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
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=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@@ -61,27 +61,27 @@ if test "$noSysDirs" = "1"; then
EXTRA_LDFLAGS_TARGET="-Wl,-L${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
if test -z "$NIX_CC_CROSS"; then
EXTRA_FLAGS_TARGET="$EXTRA_FLAGS"
EXTRA_LDFLAGS_TARGET="$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_GCC_CROSS/nix-support/orig-libc
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_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
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_GCC_CROSS/nix-support/orig-libc)/include
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_GCC_CROSS/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"

View File

@@ -188,7 +188,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}

View File

@@ -23,20 +23,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; 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_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
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=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@@ -67,27 +67,27 @@ if test "$noSysDirs" = "1"; then
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
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_GCC_CROSS/nix-support/orig-libc
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_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
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_GCC_CROSS/nix-support/orig-libc)/include
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_GCC_CROSS/nix-support/orig-libc)/lib"
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"
@@ -162,7 +162,7 @@ preConfigure() {
# Patch the configure script so it finds glibc headers
# It's important for example in order not to get libssp built, because it's
# functionality is in glibc already.
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
sed -i \
-e s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers, \
gcc/configure

View File

@@ -185,11 +185,11 @@ stdenv.mkDerivation ({
sed -i gcc/config/t-gnu \
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
''
else if cross != null || stdenv.gcc.libc != null then
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.gcc.libc;
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
@@ -272,7 +272,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; 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_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
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=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@@ -74,27 +74,27 @@ if test "$noSysDirs" = "1"; then
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
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_GCC_CROSS/nix-support/orig-libc
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_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
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_GCC_CROSS/nix-support/orig-libc)/include
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_GCC_CROSS/nix-support/orig-libc)/lib"
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"
@@ -166,11 +166,11 @@ preConfigure() {
rm -Rf zlib
fi
if test -f "$NIX_GCC/nix-support/orig-libc"; then
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.
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
sed -i \
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
gcc/configure

View File

@@ -46,15 +46,12 @@ assert stdenv.isDarwin -> gnused != null;
with stdenv.lib;
with builtins;
let version = "4.6.3";
let version = "4.6.4";
# Whether building a cross-compiler for GNU/Hurd.
crossGNU = cross != null && cross.config == "i586-pc-gnu";
patches =
[ # Fix building on Glibc 2.16.
./siginfo_t_fix.patch
]
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
@@ -232,11 +229,11 @@ stdenv.mkDerivation ({
sed -i gcc/config/t-gnu \
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
''
else if cross != null || stdenv.gcc.libc != null then
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.gcc.libc;
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
@@ -342,7 +339,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -1,211 +0,0 @@
Partly taken from:
http://gcc.gnu.org/git/?p=gcc.git;a=patch;h=5617a3db5d04630d0bfb71a3578894b4442f266d
Adapted to gcc 4.6.3. Original commit text follows.
From 5617a3db5d04630d0bfb71a3578894b4442f266d Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 20 Apr 2012 07:44:50 +0000
Subject: [PATCH] struct siginfo vs. siginfo_t
gcc/
* config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
siginfo_t instead of struct siginfo.
* config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
* config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
* config/ia64/linux-unwind.h (ia64_fallback_frame_state)
(ia64_handle_unwabi): Likewise.
* config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
* config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
* config/sh/linux-unwind.h (shmedia_fallback_frame_state)
(sh_fallback_frame_state): Likewise.
* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186610 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h
index 4c811dc..8c04b3b 100644
--- a/gcc/config/alpha/linux-unwind.h
+++ b/gcc/config/alpha/linux-unwind.h
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for Alpha Linux.
- Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -49,7 +49,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
{
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
diff --git a/gcc/config/bfin/linux-unwind.h b/gcc/config/bfin/linux-unwind.h
index 88c8285..15bb2f1 100644
--- a/gcc/config/bfin/linux-unwind.h
+++ b/gcc/config/bfin/linux-unwind.h
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for Blackfin.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -48,10 +48,10 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
int sig;
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
char retcode[8];
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h
index ad0ccfa..02b1897 100644
--- a/gcc/config/i386/linux-unwind.h
+++ b/gcc/config/i386/linux-unwind.h
@@ -136,9 +136,9 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
int sig;
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/gcc/config/ia64/linux-unwind.h b/gcc/config/ia64/linux-unwind.h
index 93f762d..da31259 100644
--- a/gcc/config/ia64/linux-unwind.h
+++ b/gcc/config/ia64/linux-unwind.h
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for IA64 Linux.
- Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -47,7 +47,7 @@ ia64_fallback_frame_state (struct _Unwind_Context *context,
struct sigframe {
char scratch[16];
unsigned long sig_number;
- struct siginfo *info;
+ siginfo_t *info;
struct sigcontext *sc;
} *frame_ = (struct sigframe *)context->psp;
struct sigcontext *sc = frame_->sc;
@@ -137,7 +137,7 @@ ia64_handle_unwabi (struct _Unwind_Context *context, _Unwind_FrameState *fs)
struct sigframe {
char scratch[16];
unsigned long sig_number;
- struct siginfo *info;
+ siginfo_t *info;
struct sigcontext *sc;
} *frame = (struct sigframe *)context->psp;
struct sigcontext *sc = frame->sc;
diff --git a/gcc/config/mips/linux-unwind.h b/gcc/config/mips/linux-unwind.h
index 02f7cd5..094ff58 100644
--- a/gcc/config/mips/linux-unwind.h
+++ b/gcc/config/mips/linux-unwind.h
@@ -1,5 +1,6 @@
/* DWARF2 EH unwinding support for MIPS Linux.
- Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2012 Free Software
+ Foundation, Inc.
This file is part of GCC.
@@ -75,7 +76,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe {
u_int32_t ass[4]; /* Argument save space for o32. */
u_int32_t trampoline[2];
- struct siginfo info;
+ siginfo_t info;
_sig_ucontext_t uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
diff --git a/gcc/config/pa/linux-unwind.h b/gcc/config/pa/linux-unwind.h
index a0560e9..38b4eda 100644
--- a/gcc/config/pa/linux-unwind.h
+++ b/gcc/config/pa/linux-unwind.h
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for PA Linux.
- Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -63,7 +63,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
int i;
struct sigcontext *sc;
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *frame;
diff --git a/gcc/config/sh/linux-unwind.h b/gcc/config/sh/linux-unwind.h
index 94ed95d..5a78e31 100644
--- a/gcc/config/sh/linux-unwind.h
+++ b/gcc/config/sh/linux-unwind.h
@@ -1,5 +1,6 @@
/* DWARF2 EH unwinding support for SH Linux.
- Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2009, 2012 Free Software Foundation,
+ Inc.
This file is part of GCC.
@@ -80,9 +81,9 @@ shmedia_fallback_frame_state (struct _Unwind_Context *context,
&& (*(unsigned long *) (pc+11) == 0x6ff0fff0))
{
struct rt_sigframe {
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
@@ -179,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
&& (*(unsigned short *) (pc+14) == 0x00ad))))
{
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/gcc/config/xtensa/linux-unwind.h b/gcc/config/xtensa/linux-unwind.h
index 32e9349..2456497 100644
--- a/gcc/config/xtensa/linux-unwind.h
+++ b/gcc/config/xtensa/linux-unwind.h
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for Xtensa.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -62,7 +62,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
struct sigcontext *sc;
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_;
--
1.7.3.4

View File

@@ -1,31 +1,27 @@
/* Automatically generated by `update-gcc.sh', do not edit.
For GCC 4.6.3. */
For GCC 4.6.4. */
{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda,
langGo }:
assert version == "4.6.3";
assert version == "4.6.4";
optional /* langC */ true (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
sha256 = "283e00881c0de258fafc5170843e4d9b14ee2a7dc4426f0d426e6be0400251c1";
sha256 = "48b566f1288f099dff8fba868499a320f83586245ec69b8c82a9042566a5bf62";
}) ++
optional langCC (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
sha256 = "b3e0c733e900e99096b0c5480f57e22e3e583ec3d83596cc2cb9986bd64b29e8";
sha256 = "4eaa347f9cd3ab7d5e14efbb9c5c03009229cd714b558fc55fa56e8996b74d42";
}) ++
optional langFortran (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2";
sha256 = "fe1bdf3485f33e6d0a998ff7bcb42526fbf3083dbfc107c3d95a88c00739eadb";
sha256 = "4f402e0d27995a02354570f0a63047f27463c72c62f1ba3c08ef5a7c6c9c3d1c";
}) ++
optional langJava (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2";
sha256 = "d0f9aafbd8fe95fdee5797cd02a9a734de0078aa62a9a249b0752adabf76d6e6";
sha256 = "4441d0c3cc04f2162f981c6b4bf29cdd9f6c16d294ce24c6bc4a05d8277abf28";
}) ++
optional langAda (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-ada-${version}.tar.bz2";
sha256 = "7bb213ec3948646df72720580fcba3489c84aa452bd0e4238712607ef83cbdf6";
}) ++
optional langGo (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-go-${version}.tar.bz2";
sha256 = "7589c16f33ad383769510bb5b9c1aeb7f865f3ae0b89b07b2370d988a4c1fe6d";
sha256 = "2a09bbf942b2557839722d4807e67559123037356f5cb1a3b12f44539968d0ad";
}) ++
[]

View File

@@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; 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_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
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=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@@ -74,7 +74,7 @@ if test "$noSysDirs" = "1"; then
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
if test -z "$NIX_CC_CROSS"; then
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
@@ -82,20 +82,20 @@ if test "$noSysDirs" = "1"; then
# 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_GCC_CROSS/nix-support/orig-libc
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_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
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_GCC_CROSS/nix-support/orig-libc)/include
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
glibc_libdir="$glibc_dir/lib"
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
@@ -167,11 +167,11 @@ preConfigure() {
rm -Rf zlib
fi
if test -f "$NIX_GCC/nix-support/orig-libc"; then
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.
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
sed -i \
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
gcc/configure

View File

@@ -54,14 +54,14 @@ assert langGo -> langCC;
with stdenv.lib;
with builtins;
let version = "4.8.3";
let version = "4.8.4";
# Whether building a cross-compiler for GNU/Hurd.
crossGNU = cross != null && cross.config == "i586-pc-gnu";
enableParallelBuilding = true;
patches = []
patches = [ ]
++ optional enableParallelBuilding ./parallel-bconfig.patch
++ optional (cross != null) ./libstdc++-target.patch
++ optional noSysDirs ./no-sys-dirs.patch
@@ -209,7 +209,7 @@ stdenv.mkDerivation ({
src = fetchurl {
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
sha256 = "07hg10zs7gnqz58my10ch0zygizqh0z0bz6pv4pgxx45n48lz3ka";
sha256 = "15c6gwm6dzsaagamxkak5smdkf1rdfbqqjs9jdbrp3lbg4ism02a";
};
inherit patches;
@@ -251,11 +251,11 @@ stdenv.mkDerivation ({
sed -i "${gnu_h}" \
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
''
else if cross != null || stdenv.gcc.libc != null then
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.gcc.libc;
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
@@ -397,7 +397,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -19,20 +19,20 @@ echo "\$LIBRARY_PATH is \`$LIBRARY_PATH'"
if test "$noSysDirs" = "1"; then
if test -e $NIX_GCC/nix-support/orig-libc; 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_GCC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
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=$(cat $NIX_GCC/nix-support/orig-libc)/include
export NIX_FIXINC_DUMMY=$(cat $NIX_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC/nix-support/orig-libc)/lib"
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
@@ -74,7 +74,7 @@ if test "$noSysDirs" = "1"; then
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
if test -z "$NIX_CC_CROSS"; then
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_CXXFLAGS="$EXTRA_FLAGS"
EXTRA_TARGET_LDFLAGS="$EXTRA_LDFLAGS"
@@ -82,20 +82,20 @@ if test "$noSysDirs" = "1"; then
# 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_GCC_CROSS/nix-support/orig-libc
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_GCC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_GCC_CROSS/nix-support/libc-ldflags) $(cat $NIX_GCC_CROSS/nix-support/libc-ldflags-before)"
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_GCC_CROSS/nix-support/orig-libc)/include
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
glibc_libdir="$glibc_dir/lib"
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
@@ -171,11 +171,11 @@ preConfigure() {
rm -Rf zlib
fi
if test -f "$NIX_GCC/nix-support/orig-libc"; then
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.
glibc_headers="$(cat $NIX_GCC/nix-support/orig-libc)/include"
glibc_headers="$(cat $NIX_CC/nix-support/orig-libc)/include"
sed -i \
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$glibc_headers", \
gcc/configure

View File

@@ -247,11 +247,11 @@ stdenv.mkDerivation ({
sed -i "${gnu_h}" \
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
''
else if cross != null || stdenv.gcc.libc != null then
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.gcc.libc;
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
@@ -385,7 +385,7 @@ stdenv.mkDerivation ({
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_GCC_CROSS = if cross == null then "${stdenv.gccCross}" else "";
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
dontStrip = true;
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -9,11 +9,11 @@ let
in
(
assert a.stdenv ? gcc ;
assert a.stdenv.gcc ? gcc ;
assert a.stdenv.gcc ? libc ;
assert a.stdenv.gcc.gcc != null ;
assert a.stdenv.gcc.libc != null ;
assert a.stdenv ? cc ;
assert a.stdenv.cc ? gcc ;
assert a.stdenv.cc ? libc ;
assert a.stdenv.cc.gcc != null ;
assert a.stdenv.cc.libc != null ;
rec {
src = a.fetchurl {
@@ -37,7 +37,7 @@ rec {
preBuild = a.fullDepEntry (''
sed -re "s@/bin/cat@$(which cat)@g" -i configure */configure
sed -re "s@if test -d /proc/self @if false @" -i configure
sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.gcc.gcc}/include -I${a.stdenv.gcc.libc}/include ^g' -i makefile
sed -re 's^([ \t])cpp ^\1cpp -I${a.stdenv.cc.gcc}/include -I${a.stdenv.cc.libc}/include ^g' -i makefile
'') ["minInit" "doUnpack" "addInputs"];
/* doConfigure should be removed if not needed */

View File

@@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
for prog in ld ar gcc strip ranlib; do
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;

View File

@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
meta = {

View File

@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libedit}/lib:${ncurses}/lib:${gmp}/lib" {} \;
for prog in ld ar gcc strip ranlib; do
find . -name "setup-config" -exec sed -i "s@/usr/bin/$prog@$(type -p $prog)@g" {} \;

View File

@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
meta = {

View File

@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
meta = {

View File

@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";

View File

@@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
preConfigure=[

View File

@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";

View File

@@ -30,7 +30,7 @@ stdenv.mkDerivation {
# find readline/gmp.
postBuild = if stdenv.isLinux then "
find . -type f -perm +100 \\
-exec patchelf --interpreter \"$(cat $NIX_GCC/nix-support/dynamic-linker)\" \\
-exec patchelf --interpreter \"$(cat $NIX_CC/nix-support/dynamic-linker)\" \\
--set-rpath \"${readline}/lib:${ncurses}/lib:${gmp}/lib\" {} \\;
" else "";

View File

@@ -12,7 +12,7 @@ stdenv.mkDerivation {
propagatedBuildInputs = [readline ncurses gmp];
configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
configureFlags = "--with-gcc=${stdenv.cc}/bin/gcc";
preConfigure =
''

View File

@@ -25,7 +25,7 @@ stdenv.mkDerivation (rec {
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-readline-libraries=${readline}/lib"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
preConfigure = "

View File

@@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
"--with-gmp-libraries=${gmp}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-readline-libraries=${readline}/lib"
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
preConfigure = ''

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
NIX_CFLAGS_COMPILE = "-fomit-frame-pointer";

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2

View File

@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
'';
configureFlags=[
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
'';
configureFlags = [
"--with-gcc=${stdenv.gcc}/bin/gcc"
"--with-gcc=${stdenv.cc}/bin/gcc"
];
# required, because otherwise all symbols from HSffi.o are stripped, and

View File

@@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
'';
configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
configureFlags = "--with-gcc=${stdenv.cc}/bin/gcc";
postInstall = ''
# ghci uses mmap with rwx protection at it implements dynamic

View File

@@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
# find editline/gmp.
(if stdenv.isLinux then ''
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${ncurses}/lib:${gmp}/lib" {} \;
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
sed -i "s|/usr/bin/gcc|gcc\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2

View File

@@ -1,12 +1,12 @@
{ stdenv, fetchurl, ghc, perl, gmp, ncurses }:
stdenv.mkDerivation rec {
version = "7.8.3";
version = "7.8.4";
name = "ghc-${version}";
src = fetchurl {
url = "http://www.haskell.org/ghc/dist/7.8.3/${name}-src.tar.xz";
sha256 = "0n5rhwl83yv8qm0zrbaxnyrf8x1i3b6si927518mwfxs96jrdkdh";
url = "http://www.haskell.org/ghc/dist/7.8.4/${name}-src.tar.xz";
sha256 = "1i4254akbb4ym437rf469gc0m40bxm31blp6s1z1g15jmnacs6f3";
};
buildInputs = [ ghc perl gmp ncurses ];

View File

@@ -1,32 +1,29 @@
{ stdenv, fetchurl, ghc, perl, gmp, ncurses, happy, alex }:
stdenv.mkDerivation rec {
version = "7.9.20141106";
version = "7.9.20141217";
name = "ghc-${version}";
src = fetchurl {
url = "http://deb.haskell.org/dailies/2014-11-06/ghc_${version}.orig.tar.bz2";
sha256 = "1si8wx8a2lrg5ba13vwpisssxa3rcxi5a7fqxhgapa8d2i2w7gaz";
url = "http://deb.haskell.org/dailies/2014-12-17/ghc_${version}.orig.tar.bz2";
sha256 = "1yfdi9r07aqbnv6xfdhs6cpj0y0yjdr03l5sa4dv0j1xs3lh1wkv";
};
buildInputs = [ ghc perl gmp ncurses happy alex ];
enableParallelBuilding = true;
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"
DYNAMIC_BY_DEFAULT = NO
'';
buildInputs = [ ghc perl ncurses happy alex ];
preConfigure = ''
echo "${buildMK}" > mk/build.mk
echo >mk/build.mk "DYNAMIC_BY_DEFAULT = NO"
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}"
'';
configureFlags = "--with-gcc=${stdenv.gcc}/bin/gcc";
configureFlags = [
"--with-gcc=${stdenv.cc}/bin/cc"
"--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
];
enableParallelBuilding = true;
# required, because otherwise all symbols from HSffi.o are stripped, and
# that in turn causes GHCi to abort
@@ -35,11 +32,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
maintainers = [
stdenv.lib.maintainers.marcweber
stdenv.lib.maintainers.andres
stdenv.lib.maintainers.simons
];
maintainers = with stdenv.lib.maintainers; [ marcweber andres simons ];
inherit (ghc.meta) license platforms;
};

View File

@@ -21,8 +21,8 @@ stdenv.mkDerivation {
cp -R * $out
set +e
for a in $out/bin/* ; do
patchelf --interpreter $(cat $NIX_GCC/nix-support/dynamic-linker) \
--set-rpath $(cat $NIX_GCC/nix-support/orig-libc)/lib:$(cat $NIX_GCC/nix-support/orig-gcc)/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib $a
patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
--set-rpath $(cat $NIX_CC/nix-support/orig-libc)/lib:$(cat $NIX_CC/nix-support/orig-gcc)/lib64:$(cat $NIX_CC/nix-support/orig-gcc)/lib $a
done
set -e
mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc

View File

@@ -17,6 +17,8 @@ stdenv.mkDerivation {
buildInputs = [ bison glibc bash makeWrapper ];
NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
# I'm not sure what go wants from its 'src', but the go installation manual
# describes an installation keeping the src.
preUnpack = ''

View File

@@ -16,6 +16,8 @@ stdenv.mkDerivation {
buildInputs = [ bison glibc bash makeWrapper ];
NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
# I'm not sure what go wants from its 'src', but the go installation manual
# describes an installation keeping the src.
preUnpack = ''

View File

@@ -1,7 +1,5 @@
{ stdenv, lib, fetchurl, fetchhg, bison, glibc, bash, coreutils, makeWrapper, tzdata, iana_etc, perl }:
assert stdenv.gcc.gcc != null;
let
loader386 = "${glibc}/lib/ld-linux.so.2";
loaderAmd64 = "${glibc}/lib/ld-linux-x86-64.so.2";
@@ -78,16 +76,16 @@ stdenv.mkDerivation {
else throw "Unsupported system";
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
CGO_ENABLED = if stdenv.isDarwin then 0 else 1;
installPhase = ''
export CC=cc
'' + stdenv.lib.optionalString (stdenv ? cc) ''
# http://lists.science.uu.nl/pipermail/nix-dev/2013-October/011891.html
# Fix for "libgcc_s.so.1 must be installed for pthread_cancel to work"
# during tests:
export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.gcc.gcc}/lib/libgcc_s.so))"
export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.gcc}/lib/libgcc_s.so))"
'' + ''
mkdir -p "$out/bin"
export GOROOT="$(pwd)/"
export GOBIN="$out/bin"

View File

@@ -60,6 +60,8 @@ stdenv.mkDerivation {
else throw "Unsupported system";
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
NIX_CFLAGS_COMPILE = "-Wno-error=cpp";
installPhase = ''
mkdir -p "$out/bin"
export GOROOT="$(pwd)/"

View File

@@ -0,0 +1,40 @@
From 3918a2ccceb98230ff517601ad60aa6bee36e2c4 Mon Sep 17 00:00:00 2001
From: Alex Malyshev <alexanderm@fb.com>
Date: Tue, 28 Oct 2014 15:55:34 -0700
Subject: [PATCH] Replace use of MAX macro with std::max in ZendPack
Summary: This has randomly bitten me in open source builds. I intermittently get
an error saying that MAX isn't defined.
Instead of trying to figure out what's going on, I'm just gonna switch
it to std::max.
Reviewed By: @paulbiss
Differential Revision: D1636740
---
hphp/runtime/base/zend-pack.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hphp/runtime/base/zend-pack.cpp b/hphp/runtime/base/zend-pack.cpp
index d878ea4..c3ee14d 100644
--- a/hphp/runtime/base/zend-pack.cpp
+++ b/hphp/runtime/base/zend-pack.cpp
@@ -21,6 +21,8 @@
#include "hphp/runtime/base/builtin-functions.h"
#include "hphp/util/tiny-vector.h"
+#include <algorithm>
+
namespace HPHP {
#define INC_OUTPUTPOS(a,b) \
@@ -294,7 +296,7 @@ Variant ZendPack::pack(const String& fmt, const Array& argv) {
case 'a':
case 'A':
case 'Z': {
- int arg_cp = (code != 'Z') ? arg : MAX(0, arg - 1);
+ int arg_cp = (code != 'Z') ? arg : std::max(0, arg - 1);
memset(&output[outputpos], (code != 'A') ? '\0' : ' ', arg);
val = argv[currentarg++].toString();
s = val.c_str();

View File

@@ -0,0 +1,40 @@
From 8207a31c26cc42fee79363a14c4a8f4fcbfffe63 Mon Sep 17 00:00:00 2001
From: Jordan DeLong <jdelong@fb.com>
Date: Mon, 6 Oct 2014 18:30:28 -0700
Subject: [PATCH] Remove some MIN/MAX macro uses in the emitter
Summary: <algorithm> has preferable type-safe versions that don't double-eval
their args.
Reviewed By: @paulbiss
Differential Revision: D1599803
---
hphp/compiler/analysis/emitter.cpp | 6 +++---
hphp/util/compatibility.h | 4 ----
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/hphp/compiler/analysis/emitter.cpp b/hphp/compiler/analysis/emitter.cpp
index 321e637..b1d3f2d 100644
--- a/hphp/compiler/analysis/emitter.cpp
+++ b/hphp/compiler/analysis/emitter.cpp
@@ -799,8 +799,8 @@ void SymbolicStack::push(char sym) {
if (sym != StackSym::W && sym != StackSym::K && sym != StackSym::L &&
sym != StackSym::T && sym != StackSym::I && sym != StackSym::H) {
m_actualStack.push_back(m_symStack.size());
- *m_actualStackHighWaterPtr = MAX(*m_actualStackHighWaterPtr,
- (int)m_actualStack.size());
+ *m_actualStackHighWaterPtr = std::max(*m_actualStackHighWaterPtr,
+ (int)m_actualStack.size());
}
m_symStack.push_back(SymEntry(sym));
}
@@ -1010,7 +1010,7 @@ int SymbolicStack::sizeActual() const {
void SymbolicStack::pushFDesc() {
m_fdescCount += kNumActRecCells;
- *m_fdescHighWaterPtr = MAX(*m_fdescHighWaterPtr, m_fdescCount);
+ *m_fdescHighWaterPtr = std::max(*m_fdescHighWaterPtr, m_fdescCount);
}
void SymbolicStack::popFDesc() {

View File

@@ -2,22 +2,28 @@
, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php, re2c
, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
, libxslt, ocaml, freetype
, libxslt, ocaml, freetype, gdb
}:
stdenv.mkDerivation rec {
name = "hhvm-${version}";
version = "3.2.0";
version = "3.3.0";
# use git version since we need submodules
src = fetchgit {
url = "https://github.com/facebook/hhvm.git";
rev = "01228273b8cf709aacbd3df1c51b1e690ecebac8";
sha256 = "418d5a55ac4ba5335a42329ebfb7dd96fdb8d5edbc2700251c86e9fa2ae4a967";
rev = "e0c98e21167b425dddf1fc9efe78c9f7a36db268";
sha256 = "0s32v713xgf4iim1zb9sg08sg1r1fs49czar3jxajsi0dwc0lkj9";
fetchSubmodules = true;
};
patches = [
./3918a2ccceb98230ff517601ad60aa6bee36e2c4.patch
./8207a31c26cc42fee79363a14c4a8f4fcbfffe63.patch
];
buildInputs =
[ cmake pkgconfig boost libunwind mariadb libmemcached pcre
[ cmake pkgconfig boost libunwind mariadb libmemcached pcre gdb
libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap
oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline
libelf uwimap binutils cyrus_sasl pam glog libpng libxslt ocaml
@@ -34,7 +40,7 @@ stdenv.mkDerivation rec {
# work around broken build system
NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2";
patchPhase = ''
prePatch = ''
substituteInPlace hphp/util/generate-buildinfo.sh \
--replace /bin/bash ${stdenv.shell}
substituteInPlace ./configure \

View File

@@ -1,4 +1,4 @@
{ gmp, makeWrapper, gcc, runCommand, idris_plain, boehmgc}:
{ stdenv, gmp, makeWrapper, runCommand, idris_plain, boehmgc}:
runCommand "idris-wrapper" {} ''
source ${makeWrapper}/nix-support/setup-hook
@@ -6,6 +6,6 @@ runCommand "idris-wrapper" {} ''
ln -s ${idris_plain}/bin/idris $out/bin
wrapProgram $out/bin/idris \
--suffix NIX_CFLAGS_COMPILE : '"-I${gmp}/include -L${gmp}/lib -L${boehmgc}/lib"' \
--suffix PATH : ${gcc}/bin \
--suffix PATH : ${stdenv.cc}/bin \
--suffix PATH : ${idris_plain}/bin
''

View File

@@ -4,7 +4,7 @@
, tcl, tk, xproto, libX11, git, mpfr
} :
let
realGcc = stdenv.gcc.gcc;
realGcc = stdenv.cc.gcc;
in
stdenv.mkDerivation rec {
pname = "julia";

View File

@@ -7,7 +7,7 @@
assert stdenv.isLinux;
let
realGcc = stdenv.gcc.gcc;
realGcc = stdenv.cc.gcc;
in
stdenv.mkDerivation rec {
pname = "julia";
@@ -108,7 +108,7 @@ stdenv.mkDerivation rec {
patchShebangs . contrib
export PATH="$PATH:${stdenv.gcc.libc}/sbin"
export PATH="$PATH:${stdenv.cc.libc}/sbin"
# ldconfig doesn't seem to ever work on NixOS; system-wide ldconfig cache
# is probably not what we want anyway on non-NixOS

View File

@@ -2,7 +2,7 @@
let
version = "3.3";
gccReal = if (stdenv.gcc.gcc or null) == null then stdenv.gcc else stdenv.gcc.gcc;
gccReal = if (stdenv.cc.gcc or null) == null then stdenv.cc else stdenv.cc.gcc;
in
stdenv.mkDerivation {
@@ -11,15 +11,15 @@ stdenv.mkDerivation {
buildInputs = [ perl llvm groff cmake libxml2 python ];
patches = [ ./clang-tablegen-dir.patch ] ++
stdenv.lib.optional (stdenv.gcc.libc != null) ./clang-purity.patch;
stdenv.lib.optional (stdenv.cc.libc != null) ./clang-purity.patch;
cmakeFlags = [
"-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
"-DCMAKE_BUILD_TYPE=Release"
"-DLLVM_TARGETS_TO_BUILD=all"
"-DGCC_INSTALL_PREFIX=${gccReal}"
] ++ stdenv.lib.optionals (stdenv.gcc.libc != null) [
"-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include/"
] ++ stdenv.lib.optionals (stdenv.cc.libc != null) [
"-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include/"
];
enableParallelBuilding = true;
@@ -29,7 +29,7 @@ stdenv.mkDerivation {
sha256 = "15mrvw43s4frk1j49qr4v5viq68h8qlf10qs6ghd6mrsmgj5vddi";
};
passthru = { gcc = stdenv.gcc.gcc; };
passthru = { gcc = stdenv.cc.gcc; };
meta = {
homepage = http://clang.llvm.org/;

View File

@@ -1,9 +1,5 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, clang-tools-extra_src }:
# be sure not to rebuild clang on darwin; some packages request it specifically
# we need to fix those
assert stdenv.isDarwin -> stdenv.gcc.nativeTools;
stdenv.mkDerivation {
name = "clang-${version}";
@@ -28,8 +24,8 @@ stdenv.mkDerivation {
"-DCMAKE_CXX_FLAGS=-std=c++11"
"-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
] ++
(stdenv.lib.optional (stdenv.gcc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.gcc.libc}/include") ++
(stdenv.lib.optional (stdenv.gcc.gcc != null) "-DGCC_INSTALL_PREFIX=${stdenv.gcc.gcc}");
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include") ++
(stdenv.lib.optional (stdenv.cc.gcc != null) "-DGCC_INSTALL_PREFIX=${stdenv.cc.gcc}");
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
@@ -38,7 +34,7 @@ stdenv.mkDerivation {
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
'';
passthru.gcc = stdenv.gcc.gcc;
passthru.gcc = stdenv.cc.gcc;
enableParallelBuilding = true;

View File

@@ -18,7 +18,7 @@ let
tar --strip-components=1 -xjf "$src" -C "$out"
# Patch binaries
interpreter="$(cat "$NIX_GCC"/nix-support/dynamic-linker)"
interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
for file in "$out"/bin/* "$out"/libexec/gcc/*/*/* "$out"/*/bin/*; do
# Skip non-executable files
case "$file" in

View File

@@ -14,7 +14,7 @@ stdenv.mkDerivation {
};
libPath = stdenv.lib.makeLibraryPath
[stdenv.gcc.gcc emacs tk tcl boost gmp];
[stdenv.cc.gcc emacs tk tcl boost gmp];
builder = ./builder.sh;

View File

@@ -14,7 +14,7 @@ patchShebangs $out
for f in $out/bin/*; do
b=$(basename $f)
if [ $b == "ozemulator" ] || [ $b == "ozwish" ]; then
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath $libPath \
$f
continue;

View File

@@ -21,7 +21,7 @@ stdenv.mkDerivation {
mkdir -p "$out"
tar --strip-components=1 -xjf "$src" -C "$out"
interpreter="$(cat "$NIX_GCC"/nix-support/dynamic-linker)"
interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
for a in "$out"/bin/*; do
patchelf --set-interpreter "$interpreter" "$a"
patchelf --set-rpath "$out/lib:${boehmgc}/lib" "$a"

View File

@@ -61,7 +61,12 @@ stdenv.mkDerivation rec {
makeFlagsArray+=(CUPS_HEADERS_PATH=$cupsDir)
'';
patches = [ ./cppflags-include-fix.patch ./fix-java-home.patch ./paxctl.patch ];
patches = [
./cppflags-include-fix.patch
./fix-java-home.patch
./paxctl.patch
./read-truststore-from-env.patch
];
NIX_NO_SELF_RPATH = true;

View File

@@ -0,0 +1,21 @@
diff -ur openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
--- openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-07-17 12:12:14.000000000 +0200
+++ openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-12-09 13:31:27.821960372 +0100
@@ -158,6 +158,7 @@
/*
* Try:
* javax.net.ssl.trustStore (if this variable exists, stop)
+ * system environment variable JAVAX_NET_SSL_TRUSTSTORE
* jssecacerts
* cacerts
*
@@ -165,6 +166,9 @@
*/
storeFileName = props.get("trustStore");
+ if (storeFileName == null) {
+ storeFileName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE");
+ }
if (!"NONE".equals(storeFileName)) {
if (storeFileName != null) {
storeFile = new File(storeFileName);

View File

@@ -5,7 +5,7 @@ unzip ${src} || true
# set the dynamic linker of unpack200, necessary for construct script
echo "patching unpack200"
patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200
echo "constructing JDK and JRE installations"
if test -z "$installjdk"; then
@@ -46,7 +46,7 @@ rpath=$rpath${rpath:+:}$jrePath/lib/$architecture/jli
# set all the dynamic linkers
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;

View File

@@ -143,7 +143,7 @@ let result = stdenv.mkDerivation rec {
# set all the dynamic linkers
find $out -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
@@ -173,8 +173,8 @@ let result = stdenv.mkDerivation rec {
* 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 []);
[stdenv.cc.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.cc.gcc] else []);
passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";

View File

@@ -72,7 +72,7 @@ stdenv.mkDerivation {
* libXt is only needed on amd64
*/
libraries =
[stdenv.gcc.libc] ++
[stdenv.cc.libc] ++
(if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt] else []);
inherit swingSupport pluginSupport architecture jce;

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "orc-0.4.22";
name = "orc-0.4.23";
src = fetchurl {
url = "http://gstreamer.freedesktop.org/src/orc/${name}.tar.xz";
sha256 = "0dgrbjm94y9l63s3srlddjcdxgrv6iazmvwh630jrw159dzhgjh4";
sha256 = "1ryz1gfgrxcj806cakcblxf0bcwq8p2mw8k86fs3f5wlwayawzkn";
};
# building memcpy_speed.log

View File

@@ -13,7 +13,7 @@ stdenv.mkDerivation {
patchPhase = ''
sed -i s,/usr/bin/ld,$(type -P ld), src/driver/phases.c
sed -i s,/lib64/ld-linux-x86-64.so.2,${stdenv.gcc.libc}/lib/ld-linux-x86-64.so.2, src/include/main_defs.h.in
sed -i s,/lib64/ld-linux-x86-64.so.2,${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2, src/include/main_defs.h.in
'';
cmakeFlags = ''
@@ -22,7 +22,7 @@ stdenv.mkDerivation {
-DPATH64_ENABLE_PSCRUNTIME=OFF
-DPATH64_ENABLE_PROFILING=OFF -DPATH64_ENABLE_TARGETS=x8664
-DCMAKE_BUILD_TYPE=Debug -DPATH64_ENABLE_FORTRAN=OFF
-DPSC_CRT_PATH=${stdenv.gcc.libc}/lib
-DPSC_CRT_PATH=${stdenv.cc.libc}/lib
'';
makeFlags = "-j4";

View File

@@ -1,7 +1,5 @@
{stdenv, fetchurl, which, file, perl, curl, python27, makeWrapper}:
assert stdenv.gcc.gcc != null;
/* Rust's build process has a few quirks :
- It requires some patched in llvm that haven't landed upstream, so it
@@ -53,21 +51,22 @@ in stdenv.mkDerivation {
mkdir -p "$out"
cp -r bin "$out/bin"
'' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.gcc.dynamicLinker}" \
--set-rpath "${stdenv.gcc.gcc}/lib/:${stdenv.gcc.gcc}/lib64/" \
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \
"$out/bin/rustc"
'' else "");
};
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ];
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
# The compiler requires cc, so we patch the source to tell it where to find it
patches = [ ./hardcode_paths.patch ./local_stage0.patch ];
postPatch = ''
substituteInPlace src/librustc/back/link.rs \
--subst-var-by "ccPath" "${stdenv.gcc}/bin/cc"
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc"
substituteInPlace src/librustc_back/archive.rs \
--subst-var-by "arPath" "${stdenv.gcc.binutils}/bin/ar"
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
'';
buildInputs = [ which file perl curl python27 makeWrapper ];

View File

@@ -1,9 +1,7 @@
{ stdenv, fetchurl, fetchgit, which, file, perl, curl, python27, makeWrapper
, tzdata, git, valgrind
, tzdata, git, valgrind, procps, coreutils
}:
assert stdenv.gcc.gcc != null;
/* Rust's build process has a few quirks :
- It requires some patched in llvm that haven't landed upstream, so it
@@ -18,19 +16,19 @@ assert stdenv.gcc.gcc != null;
*/
with ((import ./common.nix) {inherit stdenv; version = "0.13.0-pre-1673-g3a325c6";});
with ((import ./common.nix) {inherit stdenv; version = "0.13.0-pre-2604-g2f3cff6";});
let snapshot = if stdenv.system == "i686-linux"
then "c8342e762a1720be939ed7c6a39bdaa27892f66f"
then "3daf531aed03f5769402f2fef852377e2838db98"
else if stdenv.system == "x86_64-linux"
then "7a7fe6f5ed47b9cc66261f880e166c7c8738b73e"
then "4f3c8b092dd4fe159d6f25a217cf62e0e899b365"
else if stdenv.system == "i686-darwin"
then "63e8644512bd5665c14389a83d5af564c7c0b103"
then "2a3e647b9c400505bd49cfe56091e866c83574ca"
else if stdenv.system == "x86_64-darwin"
then "7933ae0e974d1b897806138b7052cb2b4514585f"
then "5e730efc34d79a33f464a87686c10eace0760a2e"
else abort "no-snapshot for platform ${stdenv.system}";
snapshotDate = "2014-11-21";
snapshotRev = "c9f6d69";
snapshotDate = "2014-12-20";
snapshotRev = "8443b09";
snapshotName = "rust-stage0-${snapshotDate}-${snapshotRev}-${platform}-${snapshot}.tar.bz2";
in stdenv.mkDerivation {
@@ -40,8 +38,8 @@ in stdenv.mkDerivation {
src = fetchgit {
url = https://github.com/rust-lang/rust;
rev = "3a325c666d2cb7e297bf3057ff2442f96a79428b";
sha256 = "0a0byglfaf0wfsnlm53vng1gqkkz4i29zphdwqg93v26mciqqc61";
rev = "2f3cff6956d56048ef7afb6d33e17cbdb2dcf038";
sha256 = "113y74sd1gr7f0xs1lsgjw3jkvhz8s4dxx34r9cxlw5vjr7fp066";
};
# We need rust to build rust. If we don't provide it, configure will try to download it.
@@ -56,13 +54,14 @@ in stdenv.mkDerivation {
mkdir -p "$out"
cp -r bin "$out/bin"
'' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.gcc.dynamicLinker}" \
--set-rpath "${stdenv.gcc.gcc}/lib/:${stdenv.gcc.gcc}/lib64/" \
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \
"$out/bin/rustc"
'' else "");
};
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ];
configureFlags = [ "--enable-local-rust" "--local-rust-root=$snapshot" ]
++ stdenv.lib.optional (stdenv.cc ? clang) "--enable-clang";
# The compiler requires cc, so we patch the source to tell it where to find it
patches = [ ./hardcode_paths.HEAD.patch ./local_stage0.HEAD.patch ]
@@ -70,12 +69,15 @@ in stdenv.mkDerivation {
postPatch = ''
substituteInPlace src/librustc_trans/back/link.rs \
--subst-var-by "ccPath" "${stdenv.gcc}/bin/cc"
--subst-var-by "ccPath" "${stdenv.cc}/bin/cc"
substituteInPlace src/librustc_back/archive.rs \
--subst-var-by "arPath" "${stdenv.gcc.binutils}/bin/ar"
--subst-var-by "arPath" "${stdenv.cc.binutils}/bin/ar"
substituteInPlace src/rust-installer/gen-install-script.sh \
--replace /bin/echo "${coreutils}/bin/echo"
'';
buildInputs = [ which file perl curl python27 makeWrapper git valgrind ];
buildInputs = [ which file perl curl python27 makeWrapper git valgrind procps ];
enableParallelBuilding = false; # disabled due to rust-lang/rust#16305

View File

@@ -47,6 +47,9 @@ stdenv.mkDerivation rec {
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
# Use whatever `cc` the stdenv provides
substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
'';
preBuild = ''

View File

@@ -50,6 +50,9 @@ stdenv.mkDerivation rec {
sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
# Use whatever `cc` the stdenv provides
substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
'';
preBuild = ''

View File

@@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
${if gputils == null then "--disable-pic14-port --disable-pic16-port" else ""}
'';
NIX_CFLAGS_COMPILE = "--std=c99"; # http://sourceforge.net/p/sdcc/code/9106/
meta = with stdenv.lib; {
description = "Small Device C Compiler";
longDescription = ''

View File

@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
'';
preConfigure = ''
configureFlagsArray+=("--elfinterp=$(cat $NIX_GCC/nix-support/dynamic-linker)")
configureFlagsArray+=("--elfinterp=$(cat $NIX_CC/nix-support/dynamic-linker)")
configureFlagsArray+=("--crtprefix=${stdenv.glibc}/lib")
configureFlagsArray+=("--sysincludepaths=${stdenv.glibc}/include:{B}/include")
configureFlagsArray+=("--libpaths=${stdenv.glibc}/lib")

View File

@@ -2,15 +2,15 @@
stdenv.mkDerivation rec {
pname = "urweb";
version = "20140830";
version = "20141206";
name = "${pname}-${version}";
src = fetchurl {
url = "http://www.impredicative.com/ur/${name}.tgz";
sha256 = "0l4zhvdy2fdvhihyl4gl09v8q4w05b1k0c6h4k8281px96d5ljgr";
sha256 = "077yakksxvdjlmwgc9wlz9jnkr345sikqjchvmxyv0axga5bw4rj";
};
buildInputs = [ stdenv.gcc file openssl mlton mysql postgresql sqlite ];
buildInputs = [ stdenv.cc file openssl mlton mysql postgresql sqlite ];
prePatch = ''
sed -e 's@/usr/bin/file@${file}/bin/file@g' -i configure
@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
preConfigure =
''
export CC="${stdenv.gcc}/bin/gcc";
export CC="${stdenv.cc}/bin/gcc";
export CCARGS="-I$out/include \
-L${mysql}/lib/mysql -L${postgresql}/lib -L${sqlite}/lib";

View File

@@ -8,10 +8,10 @@ stdenv.mkDerivation rec {
sha256 = "0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix";
};
meta = {
meta = with stdenv.lib; {
homepage = http://www.tortall.net/projects/yasm/;
description = "Complete rewrite of the NASM assembler";
license = "BSD";
platforms = stdenv.lib.platforms.unix;
license = licenses.bsd2;
platforms = platforms.unix;
};
}