Merge commit 'cfb29ab882323d379aba20a95020c7c24f883eae'

Partial staging merge, including cc-wrapper fixes

Conflicts:
	pkgs/applications/audio/spotify/default.nix
	pkgs/build-support/cc-wrapper/default.nix
	pkgs/development/compilers/cryptol/1.8.x.nix
This commit is contained in:
Shea Levy 2015-02-02 21:14:28 -05:00
commit c45372f038
153 changed files with 419 additions and 377 deletions

View File

@ -190,6 +190,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
url = http://www.calculate-linux.org/packages/licenses/iASL; url = http://www.calculate-linux.org/packages/licenses/iASL;
}; };
ijg = spdx {
spdxId = "IJG";
fullName = "Independent JPEG Group License";
};
inria = { inria = {
fullName = "INRIA Non-Commercial License Agreement"; fullName = "INRIA Non-Commercial License Agreement";
url = "http://compcert.inria.fr/doc/LICENSE"; url = "http://compcert.inria.fr/doc/LICENSE";

View File

@ -62,7 +62,7 @@ for bin in $(find $binaryDist -executable -type f) :; do
) )
if test "$names" = "glibc"; then names="stdenv.glibc"; fi if test "$names" = "glibc"; then names="stdenv.glibc"; fi
if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.cc.gcc"; fi if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.cc.cc"; fi
if test $lib != $libPath; then if test $lib != $libPath; then
interpreter="--interpreter \${$names}/lib/$lib" interpreter="--interpreter \${$names}/lib/$lib"

View File

@ -103,7 +103,7 @@ in
${pkgs.tzdata}/share/zoneinfo/** r, ${pkgs.tzdata}/share/zoneinfo/** r,
${dnscrypt-proxy}/share/dnscrypt-proxy/** r, ${dnscrypt-proxy}/share/dnscrypt-proxy/** r,
${pkgs.gcc.gcc}/lib/libssp.so.* mr, ${pkgs.gcc.cc}/lib/libssp.so.* mr,
${pkgs.libsodium}/lib/libsodium.so.* mr, ${pkgs.libsodium}/lib/libsodium.so.* mr,
} }
'') '')

View File

@ -46,7 +46,7 @@ let
cp -pv ${pkgs.glibc}/lib/libpthread.so.* $out/lib cp -pv ${pkgs.glibc}/lib/libpthread.so.* $out/lib
cp -pv ${pkgs.glibc}/lib/librt.so.* $out/lib cp -pv ${pkgs.glibc}/lib/librt.so.* $out/lib
cp -pv ${pkgs.glibc}/lib/libdl.so.* $out/lib cp -pv ${pkgs.glibc}/lib/libdl.so.* $out/lib
cp -pv ${pkgs.gcc.gcc}/lib*/libgcc_s.so.* $out/lib cp -pv ${pkgs.gcc.cc}/lib*/libgcc_s.so.* $out/lib
# Copy BusyBox. # Copy BusyBox.
cp -pvd ${pkgs.busybox}/bin/* ${pkgs.busybox}/sbin/* $out/bin/ cp -pvd ${pkgs.busybox}/bin/* ${pkgs.busybox}/sbin/* $out/bin/

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, ncurses, pkgconfig, alsaLib, flac, libmad, ffmpeg, libvorbis, mpc, mp4v2, libcue, pulseaudio}: { stdenv, fetchgit, ncurses, pkgconfig, alsaLib, flac, libmad, ffmpeg, libvorbis, libmpc, mp4v2, libcue, pulseaudio}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "cmus-${version}"; name = "cmus-${version}";
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
configurePhase = "./configure prefix=$out"; configurePhase = "./configure prefix=$out";
buildInputs = [ ncurses pkgconfig alsaLib flac libmad ffmpeg libvorbis mpc mp4v2 libcue pulseaudio ]; buildInputs = [ ncurses pkgconfig alsaLib flac libmad ffmpeg libvorbis libmpc mp4v2 libcue pulseaudio ];
meta = { meta = {
description = "Small, fast and powerful console music player for Linux and *BSD"; description = "Small, fast and powerful console music player for Linux and *BSD";

View File

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
buildPhase = '' buildPhase = ''
patchelf \ patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc}/lib:${qt48}/lib:${stdenv.cc.gcc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager --set-rpath "$out/opt/google/musicmanager:${readline}/lib:${ncurses}/lib:${stdenv.cc.libc}/lib:${qt48}/lib:${stdenv.cc.cc}/lib:${libidn}/lib:${expat}/lib:${flac}/lib:${libvorbis}/lib" opt/google/musicmanager/MusicManager
''; '';
dontPatchELF = true; dontPatchELF = true;

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, ncurses, pkgconfig, alsaLib, flac, libmad, speex, ffmpeg { stdenv, fetchurl, ncurses, pkgconfig, alsaLib, flac, libmad, speex, ffmpeg
, libvorbis, mpc, libsndfile, jack2, db, libmodplug, timidity, libid3tag , libvorbis, libmpc, libsndfile, jack2, db, libmodplug, timidity, libid3tag
, libtool , libtool
}: }:
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
ncurses pkgconfig alsaLib flac libmad speex ffmpeg libvorbis ncurses pkgconfig alsaLib flac libmad speex ffmpeg libvorbis
mpc libsndfile jack2 db libmodplug timidity libid3tag libtool libmpc libsndfile jack2 db libmodplug timidity libid3tag libtool
]; ];
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -28,7 +28,8 @@ let
nss nss
pango pango
qt4 qt4
stdenv.cc.gcc sqlite
stdenv.cc.cc
xlibs.libX11 xlibs.libX11
xlibs.libXcomposite xlibs.libXcomposite
xlibs.libXdamage xlibs.libXdamage
@ -95,7 +96,7 @@ stdenv.mkDerivation {
mkdir -p $out/bin mkdir -p $out/bin
rpath="$out/spotify-client/Data:$libdir:$out/spotify-client:${stdenv.cc.gcc}/lib64" rpath="$out/spotify-client/Data:$out/lib:$out/spotify-client:${stdenv.cc.cc}/lib64"
ln -s $out/spotify-client/spotify $out/bin/spotify ln -s $out/spotify-client/spotify $out/bin/spotify

View File

@ -7,7 +7,7 @@ let
atomEnv = buildEnv { atomEnv = buildEnv {
name = "env-atom"; name = "env-atom";
paths = [ paths = [
stdenv.cc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr

View File

@ -56,9 +56,9 @@ let
snappyPath="lib/snappy-java-1.0.5" snappyPath="lib/snappy-java-1.0.5"
7z x -o"$snappyPath" "$snappyPath.jar" 7z x -o"$snappyPath" "$snappyPath.jar"
if [ "${stdenv.system}" == "x86_64-linux" ]; then if [ "${stdenv.system}" == "x86_64-linux" ]; then
patchelf --set-rpath ${stdenv.cc.gcc}/lib64 "$snappyPath/org/xerial/snappy/native/Linux/amd64/libsnappyjava.so" patchelf --set-rpath ${stdenv.cc.cc}/lib64 "$snappyPath/org/xerial/snappy/native/Linux/amd64/libsnappyjava.so"
else else
patchelf --set-rpath ${stdenv.cc.gcc}/lib "$snappyPath/org/xerial/snappy/native/Linux/i386/libsnappyjava.so" patchelf --set-rpath ${stdenv.cc.cc}/lib "$snappyPath/org/xerial/snappy/native/Linux/i386/libsnappyjava.so"
fi fi
7z a -tzip "$snappyPath.jar" ./"$snappyPath"/* 7z a -tzip "$snappyPath.jar" ./"$snappyPath"/*
rm -vr "$snappyPath" rm -vr "$snappyPath"
@ -74,7 +74,7 @@ let
makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${loName}" \ makeWrapper "$out/$name/bin/${loName}.sh" "$out/bin/${loName}" \
--prefix PATH : "${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \ --prefix PATH : "${jdk}/bin:${coreutils}/bin:${gnugrep}/bin:${which}/bin:${git}/bin" \
--prefix LD_RUN_PATH : "${stdenv.cc.gcc}/lib/" \ --prefix LD_RUN_PATH : "${stdenv.cc.cc}/lib/" \
--prefix JDK_HOME : "$jdk" \ --prefix JDK_HOME : "$jdk" \
--prefix ${hiName}_JDK : "$jdk" --prefix ${hiName}_JDK : "$jdk"

View File

@ -5,7 +5,7 @@
let let
libPath = stdenv.lib.makeLibraryPath [ libPath = stdenv.lib.makeLibraryPath [
stdenv.cc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 nss stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3 nss
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gnome3.gconf fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gnome3.gconf
xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXcomposite xlibs.libXi xlibs.libXfixes
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
patchelf \ patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ --set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
$out/LightTable/ltbin $out/LightTable/ltbin
ln -s ${udev}/lib/libudev.so.1 $out/LightTable/libudev.so.0 ln -s ${udev}/lib/libudev.so.1 $out/LightTable/libudev.so.0

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
echo ${libPath} echo ${libPath}
patchelf \ patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ --set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
$out/sublime/sublime_text $out/sublime/sublime_text
''; '';

View File

@ -32,7 +32,7 @@ in let
for i in sublime_text plugin_host crash_reporter; do for i in sublime_text plugin_host crash_reporter; do
patchelf \ patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \ --set-rpath ${libPath}:${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"} \
$i $i
done done
''; '';
@ -41,7 +41,7 @@ in let
mkdir -p $out mkdir -p $out
cp -prvd * $out/ cp -prvd * $out/
# Without this, plugin_host crashes, even though it has the rpath # Without this, plugin_host crashes, even though it has the rpath
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl}/lib/libssl.so:${bzip2}/lib/libbz2.so wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}/libgcc_s.so.1:${openssl}/lib/libssl.so:${bzip2}/lib/libbz2.so
''; '';
}; };
in stdenv.mkDerivation { in stdenv.mkDerivation {

View File

@ -33,7 +33,7 @@ in
composableDerivation { composableDerivation {
# use gccApple to compile on darwin # use gccApple to compile on darwin
mkDerivation = ( if stdenv.isDarwin mkDerivation = ( if stdenv.isDarwin
then stdenvAdapters.overrideGCC stdenv gccApple then stdenvAdapters.overrideCC stdenv gccApple
else stdenv ).mkDerivation; else stdenv ).mkDerivation;
} (fix: { } (fix: {

View File

@ -8,7 +8,7 @@ let inherit (args.composableDerivation) composableDerivation edf; in
composableDerivation { composableDerivation {
# use gccApple to compile on darwin # use gccApple to compile on darwin
mkDerivation = ( if stdenv.isDarwin mkDerivation = ( if stdenv.isDarwin
then stdenvAdapters.overrideGCC stdenv gccApple then stdenvAdapters.overrideCC stdenv gccApple
else stdenv ).mkDerivation; else stdenv ).mkDerivation;
} (fix: { } (fix: {

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
# This should work on both x86_64, and i686 linux # This should work on both x86_64, and i686 linux
preBuild = '' preBuild = ''
export NIX_LDFLAGS="-L${gfortran.gcc}/lib64 -L${gfortran.gcc}/lib $NIX_LDFLAGS"; export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS";
''; '';
postInstall = '' postInstall = ''

View File

@ -46,10 +46,10 @@ stdenv.mkDerivation rec {
mk install mk install
mkdir -p $out/bin mkdir -p $out/bin
makeWrapper $out/share/inferno/Linux/386/bin/emu $out/bin/emu \ makeWrapper $out/share/inferno/Linux/386/bin/emu $out/bin/emu \
--suffix LD_LIBRARY_PATH ':' "${gcc46.gcc}/lib" \ --suffix LD_LIBRARY_PATH ':' "${gcc46.cc}/lib" \
--suffix PATH ':' "$out/share/inferno/Linux/386/bin" --suffix PATH ':' "$out/share/inferno/Linux/386/bin"
makeWrapper $infernoWrapper $out/bin/inferno \ makeWrapper $infernoWrapper $out/bin/inferno \
--suffix LD_LIBRARY_PATH ':' "${gcc46.gcc}/lib" \ --suffix LD_LIBRARY_PATH ':' "${gcc46.cc}/lib" \
--suffix PATH ':' "$out/share/inferno/Linux/386/bin" \ --suffix PATH ':' "$out/share/inferno/Linux/386/bin" \
--set INFERNO_ROOT "$out/share/inferno" --set INFERNO_ROOT "$out/share/inferno"
''; '';

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation {
# versions. # versions.
libPath = stdenv.lib.makeLibraryPath libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.gcc libX11 zlib libxml2 cups pango atk gtk glib gdk_pixbuf ]; [ stdenv.cc.cc libX11 zlib libxml2 cups pango atk gtk glib gdk_pixbuf ];
meta = { meta = {
description = "Adobe Reader, a viewer for PDF documents"; description = "Adobe Reader, a viewer for PDF documents";

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation {
nativeBuildInputs = [ nativeBuildInputs = [
glibc glibc
glib glib
stdenv.cc.gcc stdenv.cc.cc
libSM libSM
libICE libICE
libXi libXi

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
postInstall = '' postInstall = ''
wrapProgram "$out/bin/xca" \ wrapProgram "$out/bin/xca" \
--prefix LD_LIBRARY_PATH : "${qt4}/lib:${gcc.gcc}/lib:${gcc.gcc}/lib64:${openssl}/lib:${libtool}/lib" --prefix LD_LIBRARY_PATH : "${qt4}/lib:${gcc.cc}/lib:${gcc.cc}/lib64:${openssl}/lib:${libtool}/lib"
''; '';
buildInputs = [ openssl qt4 libtool gcc makeWrapper ]; buildInputs = [ openssl qt4 libtool gcc makeWrapper ];

View File

@ -36,7 +36,7 @@ let
''; '';
patchPhase = let patchPhase = let
rpaths = [ stdenv.cc.gcc ]; rpaths = [ stdenv.cc.cc ];
mkrpath = p: "${makeSearchPath "lib64" p}:${makeSearchPath "lib" p}"; mkrpath = p: "${makeSearchPath "lib64" p}:${makeSearchPath "lib" p}";
in '' in ''
for sofile in PepperFlash/libpepflashplayer.so \ for sofile in PepperFlash/libpepflashplayer.so \

View File

@ -70,7 +70,7 @@ stdenv.mkDerivation {
phases = "unpackPhase installPhase"; phases = "unpackPhase installPhase";
libPath = stdenv.lib.makeLibraryPath libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.gcc [ stdenv.cc.cc
alsaLib alsaLib
atk atk
cairo cairo
@ -106,7 +106,7 @@ stdenv.mkDerivation {
pulseaudio pulseaudio
systemd systemd
] + ":" + stdenv.lib.makeSearchPath "lib64" [ ] + ":" + stdenv.lib.makeSearchPath "lib64" [
stdenv.cc.gcc stdenv.cc.cc
]; ];
# "strip" after "patchelf" may break binaries. # "strip" after "patchelf" may break binaries.

View File

@ -32,7 +32,7 @@ let
xorg.libXfixes xorg.libXfixes
xorg.libXrender xorg.libXrender
xorg.libXrandr xorg.libXrandr
stdenv.cc.gcc stdenv.cc.cc
alsaLib alsaLib
pulseaudio pulseaudio
dbus_glib dbus_glib
@ -76,11 +76,11 @@ stdenv.mkDerivation rec {
cp opt/google/talkplugin/*.so $plugins cp opt/google/talkplugin/*.so $plugins
for i in libnpgoogletalk.so libppgoogletalk.so libppo1d.so; do for i in libnpgoogletalk.so libppgoogletalk.so libppo1d.so; do
patchelf --set-rpath "${makeLibraryPath [ stdenv.cc.gcc xorg.libX11 ]}:${stdenv.cc.gcc}/lib64" $plugins/$i patchelf --set-rpath "${makeLibraryPath [ stdenv.cc.cc xorg.libX11 ]}:${stdenv.cc.cc}/lib64" $plugins/$i
done done
for i in libgoogletalkremoting.so libnpo1d.so; do for i in libgoogletalkremoting.so libnpo1d.so; do
patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathPlugin}:${stdenv.cc.gcc}/lib64" $plugins/$i patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathPlugin}:${stdenv.cc.cc}/lib64" $plugins/$i
done done
mkdir -p $out/libexec/google/talkplugin mkdir -p $out/libexec/google/talkplugin
@ -88,7 +88,7 @@ stdenv.mkDerivation rec {
patchelf \ patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${rpathProgram}:${stdenv.cc.gcc}/lib64" \ --set-rpath "${rpathProgram}:${stdenv.cc.cc}/lib64" \
$out/libexec/google/talkplugin/GoogleTalkPlugin $out/libexec/google/talkplugin/GoogleTalkPlugin
# Generate an LD_PRELOAD wrapper to redirect execvp() calls to # Generate an LD_PRELOAD wrapper to redirect execvp() calls to

View File

@ -6,7 +6,7 @@
, kdeSupport ? false, qt4, kdelibs , kdeSupport ? false, qt4, kdelibs
}: }:
assert stdenv.isLinux && stdenv.cc.gcc != null && stdenv.cc.libc != null; assert stdenv.isLinux && stdenv.cc.cc.isGNU or false && stdenv.cc.libc != null;
let let
mirror = http://get.geo.opera.com/pub/opera; mirror = http://get.geo.opera.com/pub/opera;
@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
''; '';
buildInputs = buildInputs =
[ stdenv.cc.gcc stdenv.cc.libc zlib libX11 libXt libXext libSM libICE [ stdenv.cc.cc stdenv.cc.libc zlib libX11 libXt libXext libSM libICE
libXft freetype fontconfig libXrender libuuid expat libXft freetype fontconfig libXrender libuuid expat
gstreamer libxml2 gst_plugins_base gstreamer libxml2 gst_plugins_base
] ]

View File

@ -37,7 +37,7 @@ in stdenv.mkDerivation {
patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \ patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \
"$out/${appdir}/CopyConsole" "$out/${appdir}/CopyConsole"
RPATH=${gcc.gcc}/lib:$out/${appdir} RPATH=${gcc.cc}/lib:$out/${appdir}
echo "updating rpaths to: $RPATH" echo "updating rpaths to: $RPATH"
find "$out/${appdir}" -type f -a -perm +0100 \ find "$out/${appdir}" -type f -a -perm +0100 \
-print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \; -print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \;

View File

@ -76,7 +76,7 @@ in stdenv.mkDerivation {
patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \ patchelf --set-interpreter ${stdenv.glibc}/lib/${interpreter} \
"$out/${appdir}/dropbox" "$out/${appdir}/dropbox"
RPATH=${ldpath}:${gcc.gcc}/lib:$out/${appdir} RPATH=${ldpath}:${gcc.cc}/lib:$out/${appdir}
echo "updating rpaths to: $RPATH" echo "updating rpaths to: $RPATH"
find "$out/${appdir}" -type f -a -perm +0100 \ find "$out/${appdir}" -type f -a -perm +0100 \
-print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \; -print -exec patchelf --force-rpath --set-rpath "$RPATH" {} \;

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
installPhase = '' installPhase = ''
make install make install
for file in "$out"/bin/* "$out"/sbin/*; do for file in "$out"/bin/* "$out"/sbin/*; do
wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.gcc}/lib:${stdenv.glibc}/lib::${gcc.gcc}/lib64:${stdenv.glibc}/lib64:${libedit}/lib:${qt4}/lib" wrapProgram $file --prefix LD_LIBRARY_PATH ":" "$out/lib:${openssl}/lib:${gcc.cc}/lib:${stdenv.glibc}/lib::${gcc.cc}/lib64:${stdenv.glibc}/lib64:${libedit}/lib:${qt4}/lib"
done done
''; '';

View File

@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
"USE_BV32=" "USE_COREAUDIO=" "USE_G711=" "USE_G722=" "USE_G722_1=" "USE_BV32=" "USE_COREAUDIO=" "USE_G711=" "USE_G722=" "USE_G722_1="
"USE_ILBC=" "USE_OPUS=" "USE_SILK=" "USE_ILBC=" "USE_OPUS=" "USE_SILK="
] ]
++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}" ++ stdenv.lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}" ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
; ;
NIX_CFLAGS_COMPILE='' -I${librem}/include/rem -I${gsm}/include/gsm ''; NIX_CFLAGS_COMPILE='' -I${librem}/include/rem -I${gsm}/include/gsm '';

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation {
libPath = libPath =
stdenv.lib.makeLibraryPath [ stdenv.lib.makeLibraryPath [
openssl alsaLib libXext libXfixes libXrandr libjpeg curl_custom openssl alsaLib libXext libXfixes libXrandr libjpeg curl_custom
libX11 libXmu libXv qt4 libXtst mesa stdenv.cc.gcc zlib libX11 libXmu libXv qt4 libXtst mesa stdenv.cc.cc zlib
gnome.GConf libidn rtmpdump c-ares openldap gnome.GConf libidn rtmpdump c-ares openldap
]; ];
buildCommand = '' buildCommand = ''

View File

@ -41,7 +41,7 @@ let
xz xz
libcanberra libcanberra
xcbutilkeysyms xcbutilkeysyms
] + ":${stdenv.cc.gcc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}"; ] + ":${stdenv.cc.cc}/lib${stdenv.lib.optionalString stdenv.is64bit "64"}";
src = src =
if stdenv.system == "x86_64-linux" then if stdenv.system == "x86_64-linux" then

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
stdenv.glibc stdenv.glibc
stdenv.cc.gcc stdenv.cc.cc
libXv libXv
libXext libXext
libX11 libX11

View File

@ -67,7 +67,7 @@ stdenv.mkDerivation {
phases = "unpackPhase installPhase"; phases = "unpackPhase installPhase";
libPath = stdenv.lib.makeLibraryPath libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.gcc [ stdenv.cc.cc
gconf gconf
alsaLib alsaLib
at_spi2_atk at_spi2_atk
@ -100,7 +100,7 @@ stdenv.mkDerivation {
nss nss
pango pango
] + ":" + stdenv.lib.makeSearchPath "lib64" [ ] + ":" + stdenv.lib.makeSearchPath "lib64" [
stdenv.cc.gcc stdenv.cc.cc
]; ];
installPhase = installPhase =

View File

@ -5,7 +5,7 @@ let
topath = "${wineUnstable}/bin"; topath = "${wineUnstable}/bin";
toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib") toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib")
[ stdenv.cc.gcc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]); [ stdenv.cc.cc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]);
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "teamviewer-8.0.17147"; name = "teamviewer-8.0.17147";
@ -34,7 +34,7 @@ stdenv.mkDerivation {
EOF EOF
chmod +x $out/bin/teamviewer chmod +x $out/bin/teamviewer
patchelf --set-rpath "${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer8/tv_bin/teamviewerd patchelf --set-rpath "${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer8/tv_bin/teamviewerd
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/teamviewer8/tv_bin/teamviewerd patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/teamviewer8/tv_bin/teamviewerd
ln -s $out/share/teamviewer8/tv_bin/teamviewerd $out/bin/ ln -s $out/share/teamviewer8/tv_bin/teamviewerd $out/bin/
''; '';

View File

@ -5,7 +5,7 @@ let
topath = "${wineUnstable}/bin"; topath = "${wineUnstable}/bin";
toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib") toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib")
[ stdenv.cc.gcc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]); [ stdenv.cc.cc libX11 libXtst libXext libXdamage libXfixes wineUnstable ]);
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "teamviewer-9.0.32150"; name = "teamviewer-9.0.32150";
@ -34,7 +34,7 @@ stdenv.mkDerivation {
EOF EOF
chmod +x $out/bin/teamviewer chmod +x $out/bin/teamviewer
patchelf --set-rpath "${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer9/tv_bin/teamviewerd patchelf --set-rpath "${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib:${libX11}/lib:${libXext}/lib:${libXau}/lib:${libXdamage}/lib:${libXfixes}/lib" $out/share/teamviewer9/tv_bin/teamviewerd
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/teamviewer9/tv_bin/teamviewerd patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/share/teamviewer9/tv_bin/teamviewerd
ln -s $out/share/teamviewer9/tv_bin/teamviewerd $out/bin/ ln -s $out/share/teamviewer9/tv_bin/teamviewerd $out/bin/
''; '';

View File

@ -6,7 +6,7 @@ let
topath = "${wine}/bin"; topath = "${wine}/bin";
toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib") toldpath = stdenv.lib.concatStringsSep ":" (map (x: "${x}/lib")
[ stdenv.cc.gcc libX11 libXtst libXext libXdamage libXfixes wine ]); [ stdenv.cc.cc libX11 libXtst libXext libXdamage libXfixes wine ]);
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "teamviewer-7.0.9377"; name = "teamviewer-7.0.9377";

View File

@ -70,7 +70,7 @@ stdenv.mkDerivation {
phases = "unpackPhase installPhase"; phases = "unpackPhase installPhase";
libPath = stdenv.lib.makeLibraryPath libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.gcc [ stdenv.cc.cc
alsaLib alsaLib
atk atk
cairo cairo
@ -106,7 +106,7 @@ stdenv.mkDerivation {
pulseaudio pulseaudio
systemd systemd
] + ":" + stdenv.lib.makeSearchPath "lib64" [ ] + ":" + stdenv.lib.makeSearchPath "lib64" [
stdenv.cc.gcc stdenv.cc.cc
]; ];
# "strip" after "patchelf" may break binaries. # "strip" after "patchelf" may break binaries.

View File

@ -63,7 +63,7 @@ stdenv.mkDerivation rec {
mkdir -p "$out"/bin mkdir -p "$out"/bin
cat > "$out"/bin/eagle << EOF cat > "$out"/bin/eagle << EOF
#!${stdenv.shell} #!${stdenv.shell}
export LD_LIBRARY_PATH="${stdenv.cc.gcc}/lib:${libPath}" export LD_LIBRARY_PATH="${stdenv.cc.cc}/lib:${libPath}"
export LD_PRELOAD="$out/lib/eagle_fixer.so" export LD_PRELOAD="$out/lib/eagle_fixer.so"
exec "$dynlinker" "$out/eagle-${version}/bin/eagle" "\$@" exec "$dynlinker" "$out/eagle-${version}/bin/eagle" "\$@"
EOF EOF

View File

@ -5,9 +5,9 @@ assert stdenv.isLinux;
let let
libPath = stdenv.lib.makeLibraryPath libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.libc stdenv.cc.gcc gtk gdk_pixbuf atk pango glib cairo [ stdenv.cc.libc stdenv.cc.cc gtk gdk_pixbuf atk pango glib cairo
freetype fontconfig libxml2 gnome2.gtksourceview freetype fontconfig libxml2 gnome2.gtksourceview
] + ":${stdenv.cc.gcc}/lib64"; ] + ":${stdenv.cc.cc}/lib64";
patchExe = x: '' patchExe = x: ''
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \

View File

@ -45,7 +45,7 @@ stdenv.mkDerivation rec {
CXX=$(type -p g++) CXX=$(type -p g++)
FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran" FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran"
JAVA_HOME="${jdk}" JAVA_HOME="${jdk}"
LDFLAGS="-L${gfortran.gcc}/lib" LDFLAGS="-L${gfortran.cc}/lib"
RANLIB=$(type -p ranlib) RANLIB=$(type -p ranlib)
R_SHELL="${stdenv.shell}" R_SHELL="${stdenv.shell}"
) )

View File

@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
coreutils coreutils
fontconfig fontconfig
freetype freetype
gcc.gcc gcc.cc
gcc.libc gcc.libc
glib glib
ncurses ncurses

View File

@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
coreutils coreutils
fontconfig fontconfig
freetype freetype
gcc.gcc gcc.cc
gcc.libc gcc.libc
glib glib
ncurses ncurses

View File

@ -19,8 +19,8 @@ stdenv.mkDerivation rec {
buildInputs = [openssl qt4 mesa zlib pkgconfig libav]; buildInputs = [openssl qt4 mesa zlib pkgconfig libav];
libPath = stdenv.lib.makeLibraryPath [stdenv.cc.gcc openssl mesa qt4 zlib ] libPath = stdenv.lib.makeLibraryPath [stdenv.cc.cc openssl mesa qt4 zlib ]
+ ":" + stdenv.cc.gcc + "/lib64"; + ":" + stdenv.cc.cc + "/lib64";
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "convert blu-ray and dvd to mkv"; description = "convert blu-ray and dvd to mkv";

View File

@ -70,7 +70,7 @@ stdenv.mkDerivation {
'' ''
else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions") else throw ("Architecture: "+stdenv.system+" not supported for VirtualBox guest additions")
} }
patchelf --set-rpath ${stdenv.cc.gcc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i patchelf --set-rpath ${stdenv.cc.cc}/lib:${dbus}/lib:${libX11}/lib:${libXt}/lib:${libXext}/lib:${libXmu}/lib:${libXfixes}/lib:${libXrandr}/lib:${libXcursor}/lib $i
done done
for i in lib/VBoxOGL*.so for i in lib/VBoxOGL*.so

View File

@ -165,8 +165,8 @@ let
cp -rsf ${staticUsrProfileTarget}/lib64/* lib64/ cp -rsf ${staticUsrProfileTarget}/lib64/* lib64/
# copy gcc libs (and may overwrite exitsting wrongly placed libs) # copy gcc libs (and may overwrite exitsting wrongly placed libs)
cp -rsf ${choosenGcc.gcc}/lib/* lib/ cp -rsf ${choosenGcc.cc}/lib/* lib/
cp -rsf ${choosenGcc.gcc}/lib64/* lib64/ cp -rsf ${choosenGcc.cc}/lib64/* lib64/
''; '';
in stdenv.mkDerivation { in stdenv.mkDerivation {

View File

@ -6,7 +6,7 @@ if [ -e @out@/nix-support/libc-cflags ]; then
fi fi
if [ -e @out@/nix-support/gcc-cflags ]; then if [ -e @out@/nix-support/gcc-cflags ]; then
export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/gcc-cflags) $NIX_CFLAGS_COMPILE" export NIX_CFLAGS_COMPILE="$(cat @out@/nix-support/cc-cflags) $NIX_CFLAGS_COMPILE"
fi fi
if [ -e @out@/nix-support/gnat-cflags ]; then if [ -e @out@/nix-support/gnat-cflags ]; then
@ -18,7 +18,7 @@ if [ -e @out@/nix-support/libc-ldflags ]; then
fi fi
if [ -e @out@/nix-support/gcc-ldflags ]; then if [ -e @out@/nix-support/gcc-ldflags ]; then
export NIX_LDFLAGS+=" $(cat @out@/nix-support/gcc-ldflags)" export NIX_LDFLAGS+=" $(cat @out@/nix-support/cc-ldflags)"
fi fi
if [ -e @out@/nix-support/libc-ldflags-before ]; then if [ -e @out@/nix-support/libc-ldflags-before ]; then

View File

@ -79,7 +79,6 @@ if [ "$NIX_ENFORCE_PURITY" = 1 -a -n "$NIX_STORE" ]; then
params=("${rest[@]}") params=("${rest[@]}")
fi fi
# Add the flags for the C compiler proper. # Add the flags for the C compiler proper.
extraAfter=($NIX_CFLAGS_COMPILE) extraAfter=($NIX_CFLAGS_COMPILE)
extraBefore=() extraBefore=()

View File

@ -1,4 +1,4 @@
# The Nixpkgs GCC is not directly usable, since it doesn't know where # The Nixpkgs CC is not directly usable, since it doesn't know where
# the C library and standard header files are. Therefore the compiler # the C library and standard header files are. Therefore the compiler
# produced by that package cannot be installed directly in a user # produced by that package cannot be installed directly in a user
# environment and used from the command line. So we use a wrapper # environment and used from the command line. So we use a wrapper
@ -6,35 +6,36 @@
# compiler and the linker just "work". # compiler and the linker just "work".
{ name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? "" { name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? ""
, gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell , cc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? stdenv.shell
, zlib ? null, extraPackages ? [] , zlib ? null, extraPackages ? []
, setupHook ? ./setup-hook.sh , setupHook ? ./setup-hook.sh
, libcxx ? null, libcxxabi ? null
}: }:
with stdenv.lib; with stdenv.lib;
assert nativeTools -> nativePrefix != ""; assert nativeTools -> nativePrefix != "";
assert !nativeTools -> gcc != null && binutils != null && coreutils != null; assert !nativeTools -> cc != null && binutils != null && coreutils != null;
assert !nativeLibc -> libc != null; assert !nativeLibc -> libc != null;
# For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper. # For ghdl (the vhdl language provider to gcc) we need zlib in the wrapper.
assert gcc.langVhdl or false -> zlib != null; assert cc.langVhdl or false -> zlib != null;
let let
gccVersion = (builtins.parseDrvName gcc.name).version; ccVersion = (builtins.parseDrvName cc.name).version;
gccName = (builtins.parseDrvName gcc.name).name; ccName = (builtins.parseDrvName cc.name).name;
in in
stdenv.mkDerivation { stdenv.mkDerivation {
name = name =
(if name != "" then name else gccName + "-wrapper") + (if name != "" then name else ccName + "-wrapper") +
(if gcc != null && gccVersion != "" then "-" + gccVersion else ""); (if cc != null && ccVersion != "" then "-" + ccVersion else "");
preferLocalBuild = true; preferLocalBuild = true;
inherit gcc shell; inherit cc shell libcxx libcxxabi;
libc = if nativeLibc then null else libc; libc = if nativeLibc then null else libc;
binutils = if nativeTools then null else binutils; binutils = if nativeTools then null else binutils;
# The wrapper scripts use 'cat', so we may need coreutils. # The wrapper scripts use 'cat', so we may need coreutils.
@ -74,7 +75,7 @@ stdenv.mkDerivation {
# compile, because it uses "#include_next <limits.h>" to find the # compile, because it uses "#include_next <limits.h>" to find the
# limits.h file in ../includes-fixed. To remedy the problem, # limits.h file in ../includes-fixed. To remedy the problem,
# another -idirafter is necessary to add that directory again. # another -idirafter is necessary to add that directory again.
echo "-B$libc/lib/ -idirafter $libc/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags echo "-B$libc/lib/ -idirafter $libc/include -idirafter $cc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags
echo "-L$libc/lib" > $out/nix-support/libc-ldflags echo "-L$libc/lib" > $out/nix-support/libc-ldflags
@ -87,43 +88,50 @@ stdenv.mkDerivation {
'' ''
+ (if nativeTools then '' + (if nativeTools then ''
gccPath="${nativePrefix}/bin" ccPath="${nativePrefix}/bin"
ldPath="${nativePrefix}/bin" ldPath="${nativePrefix}/bin"
'' else '' '' else ''
echo $gcc > $out/nix-support/orig-gcc echo $cc > $out/nix-support/orig-cc
# GCC shows $gcc/lib in `gcc -print-search-dirs', but not # GCC shows $cc/lib in `gcc -print-search-dirs', but not
# $gcc/lib64 (even though it does actually search there...).. # $cc/lib64 (even though it does actually search there...)..
# This confuses libtool. So add it to the compiler tool search # This confuses libtool. So add it to the compiler tool search
# path explicitly. # path explicitly.
if [ -e "$gcc/lib64" -a ! -L "$gcc/lib64" ]; then if [ -e "$cc/lib64" -a ! -L "$cc/lib64" ]; then
gccLDFlags+=" -L$gcc/lib64" ccLDFlags+=" -L$cc/lib64"
gccCFlags+=" -B$gcc/lib64" ccCFlags+=" -B$cc/lib64"
fi fi
gccLDFlags+=" -L$gcc/lib" ccLDFlags+=" -L$cc/lib"
${optionalString gcc.langVhdl or false '' ${optionalString cc.langVhdl or false ''
gccLDFlags+=" -L${zlib}/lib" ccLDFlags+=" -L${zlib}/lib"
''} ''}
# Find the gcc libraries path (may work only without multilib). # Find the gcc libraries path (may work only without multilib).
${optionalString gcc.langAda or false '' ${optionalString cc.langAda or false ''
basePath=`echo $gcc/lib/*/*/*` basePath=`echo $cc/lib/*/*/*`
gccCFlags+=" -B$basePath -I$basePath/adainclude" ccCFlags+=" -B$basePath -I$basePath/adainclude"
gnatCFlags="-aI$basePath/adainclude -aO$basePath/adalib" gnatCFlags="-aI$basePath/adainclude -aO$basePath/adalib"
echo "$gnatCFlags" > $out/nix-support/gnat-cflags echo "$gnatCFlags" > $out/nix-support/gnat-cflags
''} ''}
echo "$gccLDFlags" > $out/nix-support/gcc-ldflags if [ -e $ccPath/clang ]; then
echo "$gccCFlags" > $out/nix-support/gcc-cflags # Need files like crtbegin.o from gcc
# It's unclear if these will ever be provided by an LLVM project
ccCFlags="$ccCFlags -B$basePath"
ccCFlags="$ccCFlags -isystem$cc/lib/clang/$ccVersion/include"
fi
gccPath="$gcc/bin" echo "$ccLDFlags" > $out/nix-support/cc-ldflags
echo "$ccCFlags" > $out/nix-support/cc-cflags
ccPath="$cc/bin"
ldPath="$binutils/bin" ldPath="$binutils/bin"
# Propagate the wrapped gcc so that if you install the wrapper, # Propagate the wrapped cc so that if you install the wrapper,
# you get tools like gcov, the manpages, etc. as well (including # you get tools like gcov, the manpages, etc. as well (including
# for binutils and Glibc). # for binutils and Glibc).
echo $gcc $binutils $libc > $out/nix-support/propagated-user-env-packages echo $cc $binutils $libc > $out/nix-support/propagated-user-env-packages
echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs
'' ''
@ -137,7 +145,7 @@ stdenv.mkDerivation {
+ '' + ''
# Create a symlink to as (the assembler). This is useful when a # Create a symlink to as (the assembler). This is useful when a
# gcc-wrapper is installed in a user environment, as it ensures that # cc-wrapper is installed in a user environment, as it ensures that
# the right assembler is called. # the right assembler is called.
if [ -e $ldPath/as ]; then if [ -e $ldPath/as ]; then
ln -s $ldPath/as $out/bin/as ln -s $ldPath/as $out/bin/as
@ -153,64 +161,62 @@ stdenv.mkDerivation {
wrap ld.bfd ${./ld-wrapper.sh} $binutils/bin/ld.bfd wrap ld.bfd ${./ld-wrapper.sh} $binutils/bin/ld.bfd
fi fi
if [ -e $gccPath/gcc ]; then export real_cc=cc
wrap gcc ${./gcc-wrapper.sh} $gccPath/gcc export real_cxx=c++
if [ -e $ccPath/gcc ]; then
wrap gcc ${./cc-wrapper.sh} $ccPath/gcc
ln -s gcc $out/bin/cc ln -s gcc $out/bin/cc
elif [ -e $gccPath/clang ]; then export real_cc=gcc
wrap clang ${./gcc-wrapper.sh} $gccPath/clang export real_cxx=g++
elif [ -e $ccPath/clang ]; then
wrap clang ${./cc-wrapper.sh} $ccPath/clang
ln -s clang $out/bin/cc ln -s clang $out/bin/cc
export real_cc=clang
export real_cxx=clang++
fi fi
if [ -e $gccPath/g++ ]; then if [ -e $ccPath/g++ ]; then
wrap g++ ${./gcc-wrapper.sh} $gccPath/g++ wrap g++ ${./cc-wrapper.sh} $ccPath/g++
ln -s g++ $out/bin/c++ ln -s g++ $out/bin/c++
elif [ -e $gccPath/clang++ ]; then elif [ -e $ccPath/clang++ ]; then
wrap clang++ ${./gcc-wrapper.sh} $gccPath/clang++ wrap clang++ ${./cc-wrapper.sh} $ccPath/clang++
ln -s clang++ $out/bin/c++ ln -s clang++ $out/bin/c++
fi fi
if [ -e $gccPath/cpp ]; then if [ -e $ccPath/cpp ]; then
wrap cpp ${./gcc-wrapper.sh} $gccPath/cpp wrap cpp ${./cc-wrapper.sh} $ccPath/cpp
fi fi
'' ''
+ optionalString gcc.langFortran or false '' + optionalString cc.langFortran or false ''
wrap gfortran ${./gcc-wrapper.sh} $gccPath/gfortran wrap gfortran ${./cc-wrapper.sh} $ccPath/gfortran
ln -sv gfortran $out/bin/g77 ln -sv gfortran $out/bin/g77
ln -sv gfortran $out/bin/f77 ln -sv gfortran $out/bin/f77
'' ''
+ optionalString gcc.langJava or false '' + optionalString cc.langJava or false ''
wrap gcj ${./gcc-wrapper.sh} $gccPath/gcj wrap gcj ${./cc-wrapper.sh} $ccPath/gcj
'' ''
+ optionalString gcc.langGo or false '' + optionalString cc.langGo or false ''
wrap gccgo ${./gcc-wrapper.sh} $gccPath/gccgo wrap ccgo ${./cc-wrapper.sh} $ccPath/gccgo
'' ''
+ optionalString gcc.langAda or false '' + optionalString cc.langAda or false ''
wrap gnatgcc ${./gcc-wrapper.sh} $gccPath/gnatgcc wrap gnatgcc ${./cc-wrapper.sh} $ccPath/gnatgcc
wrap gnatmake ${./gnat-wrapper.sh} $gccPath/gnatmake wrap gnatmake ${./gnat-wrapper.sh} $ccPath/gnatmake
wrap gnatbind ${./gnat-wrapper.sh} $gccPath/gnatbind wrap gnatbind ${./gnat-wrapper.sh} $ccPath/gnatbind
wrap gnatlink ${./gnatlink-wrapper.sh} $gccPath/gnatlink wrap gnatlink ${./gnatlink-wrapper.sh} $ccPath/gnatlink
'' ''
+ optionalString gcc.langVhdl or false '' + optionalString cc.langVhdl or false ''
ln -s $gccPath/ghdl $out/bin/ghdl ln -s $ccPath/ghdl $out/bin/ghdl
'' ''
+ '' + ''
substituteAll ${setupHook} $out/nix-support/setup-hook substituteAll ${setupHook} $out/nix-support/setup-hook
substituteAll ${./add-flags} $out/nix-support/add-flags.sh substituteAll ${./add-flags} $out/nix-support/add-flags.sh
cp -p ${./utils.sh} $out/nix-support/utils.sh cp -p ${./utils.sh} $out/nix-support/utils.sh
if [ -e $out/bin/clang ]; then
echo 'export CC; : ''${CC:=clang}' >> $out/nix-support/setup-hook
fi
if [ -e $out/bin/clang++ ]; then
echo 'export CXX; : ''${CXX:=clang++}' >> $out/nix-support/setup-hook
fi
''; '';
# The dynamic linker has different names on different Linux platforms. # The dynamic linker has different names on different Linux platforms.
@ -230,7 +236,7 @@ stdenv.mkDerivation {
libc = stdenv.ccCross.libc; libc = stdenv.ccCross.libc;
coreutils = coreutils.crossDrv; coreutils = coreutils.crossDrv;
binutils = binutils.crossDrv; binutils = binutils.crossDrv;
gcc = gcc.crossDrv; cc = cc.crossDrv;
# #
# This is not the best way to do this. I think the reference should be # This is not the best way to do this. I think the reference should be
# the style in the gcc-cross-wrapper, but to keep a stable stdenv now I # the style in the gcc-cross-wrapper, but to keep a stable stdenv now I
@ -243,10 +249,10 @@ stdenv.mkDerivation {
}; };
meta = meta =
let gcc_ = if gcc != null then gcc else {}; in let cc_ = if cc != null then cc else {}; in
(if gcc_ ? meta then removeAttrs gcc.meta ["priority"] else {}) // (if cc_ ? meta then removeAttrs cc.meta ["priority"] else {}) //
{ description = { description =
stdenv.lib.attrByPath ["meta" "description"] "System C compiler" gcc_ stdenv.lib.attrByPath ["meta" "description"] "System C compiler" cc_
+ " (wrapper script)"; + " (wrapper script)";
}; };
} }

View File

@ -18,8 +18,8 @@ envHooks+=(addCVars)
# Note: these come *after* $out in the PATH (see setup.sh). # Note: these come *after* $out in the PATH (see setup.sh).
if [ -n "@gcc@" ]; then if [ -n "@cc@" ]; then
addToSearchPath PATH @gcc@/bin addToSearchPath PATH @cc@/bin
fi fi
if [ -n "@binutils@" ]; then if [ -n "@binutils@" ]; then
@ -34,5 +34,10 @@ if [ -n "@coreutils@" ]; then
addToSearchPath PATH @coreutils@/bin addToSearchPath PATH @coreutils@/bin
fi fi
export CC=cc if [ -z "$crossConfig" ]; then
export CXX=c++ export CC=@real_cc@
export CXX=@real_cxx@
else
export BUILD_CC=@real_cc@
export BUILD_CXX=@real_cxx@
fi

View File

@ -85,3 +85,6 @@ if test "$NIX_NO_SELF_RPATH" != "1"; then
export NIX_CROSS_LDFLAGS="-rpath $out/lib64 -rpath-link $out/lib $NIX_CROSS_LDFLAGS" export NIX_CROSS_LDFLAGS="-rpath $out/lib64 -rpath-link $out/lib $NIX_CROSS_LDFLAGS"
fi fi
fi fi
export CC=${crossConfig}-gcc
export CXX=${crossConfig}-g++

View File

@ -3,7 +3,7 @@
kde { kde {
buildInputs = [ kdelibs libtool ]; buildInputs = [ kdelibs libtool ];
preConfigure = "export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:${gcc}:${gcc.gcc}"; preConfigure = "export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:${gcc}:${gcc.cc}";
meta = { meta = {
description = "various KDE development utilities"; description = "various KDE development utilities";

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
gtk2 glib fontconfig freetype unixODBC alsaLib gtk2 glib fontconfig freetype unixODBC alsaLib
]; ];
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64"; rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc}/lib64";
unpackPhase = '' unpackPhase = ''
sh $src --keep --noexec sh $src --keep --noexec

View File

@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
gtk2 glib fontconfig freetype unixODBC alsaLib gtk2 glib fontconfig freetype unixODBC alsaLib
]; ];
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.gcc}/lib64"; rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc}/lib64";
unpackPhase = '' unpackPhase = ''
sh $src --keep --noexec sh $src --keep --noexec

View File

@ -8,7 +8,7 @@
, enableShared ? true , enableShared ? true
, texinfo ? null , texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java , perl ? null # optional, for texi2pod (then pod2man); required for Java
, gmp, mpfr, mpc, gettext, which , gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO) , libelf # optional, for link-time optimizations (LTO)
, ppl ? null, cloogppl ? null # optional, for the Graphite optimization framework , ppl ? null, cloogppl ? null # optional, for the Graphite optimization framework
, zlib ? null, boehmgc ? null , zlib ? null, boehmgc ? null
@ -208,7 +208,7 @@ stdenv.mkDerivation ({
nativeBuildInputs = [ texinfo which ] nativeBuildInputs = [ texinfo which ]
++ optional (perl != null) perl; ++ optional (perl != null) perl;
buildInputs = [ gmp mpfr mpc libelf gettext ] buildInputs = [ gmp mpfr libmpc libelf gettext ]
++ (optional (ppl != null) ppl) ++ (optional (ppl != null) ppl)
++ (optional (cloogppl != null) cloogppl) ++ (optional (cloogppl != null) cloogppl)
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
@ -236,7 +236,7 @@ stdenv.mkDerivation ({
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
--with-gmp=${gmp} --with-gmp=${gmp}
--with-mpfr=${mpfr} --with-mpfr=${mpfr}
--with-mpc=${mpc} --with-mpc=${libmpc}
${if libelf != null then "--with-libelf=${libelf}" else ""} ${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch --disable-libstdcxx-pch
--without-included-gettext --without-included-gettext

View File

@ -9,7 +9,7 @@
, enableShared ? true , enableShared ? true
, texinfo ? null , texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java , perl ? null # optional, for texi2pod (then pod2man); required for Java
, gmp, mpfr, mpc, gettext, which , gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO) , libelf # optional, for link-time optimizations (LTO)
, ppl ? null, cloog ? null # optional, for the Graphite optimization framework. , ppl ? null, cloog ? null # optional, for the Graphite optimization framework.
, zlib ? null, boehmgc ? null , zlib ? null, boehmgc ? null
@ -253,7 +253,7 @@ stdenv.mkDerivation ({
++ (optional (perl != null) perl) ++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig); ++ (optional javaAwtGtk pkgconfig);
buildInputs = [ gmp mpfr mpc libelf ] buildInputs = [ gmp mpfr libmpc libelf ]
++ (optional (ppl != null) ppl) ++ (optional (ppl != null) ppl)
++ (optional (cloog != null) cloog) ++ (optional (cloog != null) cloog)
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
@ -291,7 +291,7 @@ stdenv.mkDerivation ({
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
--with-gmp=${gmp} --with-gmp=${gmp}
--with-mpfr=${mpfr} --with-mpfr=${mpfr}
--with-mpc=${mpc} --with-mpc=${libmpc}
${if libelf != null then "--with-libelf=${libelf}" else ""} ${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch --disable-libstdcxx-pch
--without-included-gettext --without-included-gettext

View File

@ -11,7 +11,7 @@
, enableShared ? true , enableShared ? true
, texinfo ? null , texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java , perl ? null # optional, for texi2pod (then pod2man); required for Java
, gmp, mpfr, mpc, gettext, which , gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO) , libelf # optional, for link-time optimizations (LTO)
, cloog ? null, isl ? null # optional, for the Graphite optimization framework. , cloog ? null, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null, boehmgc ? null , zlib ? null, boehmgc ? null
@ -275,7 +275,7 @@ stdenv.mkDerivation ({
++ (optional (perl != null) perl) ++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig); ++ (optional javaAwtGtk pkgconfig);
buildInputs = [ gmp mpfr mpc libelf ] buildInputs = [ gmp mpfr libmpc libelf ]
++ (optional (cloog != null) cloog) ++ (optional (cloog != null) cloog)
++ (optional (isl != null) isl) ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
@ -333,7 +333,7 @@ stdenv.mkDerivation ({
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
--with-gmp=${gmp} --with-gmp=${gmp}
--with-mpfr=${mpfr} --with-mpfr=${mpfr}
--with-mpc=${mpc} --with-mpc=${libmpc}
${if libelf != null then "--with-libelf=${libelf}" else ""} ${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch --disable-libstdcxx-pch
--without-included-gettext --without-included-gettext
@ -487,7 +487,7 @@ stdenv.mkDerivation ({
else null; else null;
passthru = passthru =
{ inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; }; { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; };
inherit enableParallelBuilding enableMultilib; inherit enableParallelBuilding enableMultilib;

View File

@ -9,7 +9,7 @@
, enableShared ? true , enableShared ? true
, texinfo ? null , texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man); required for Java , perl ? null # optional, for texi2pod (then pod2man); required for Java
, gmp, mpfr, mpc, gettext, which , gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO) , libelf # optional, for link-time optimizations (LTO)
, cloog ? null, isl ? null # optional, for the Graphite optimization framework. , cloog ? null, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null, boehmgc ? null , zlib ? null, boehmgc ? null
@ -271,7 +271,7 @@ stdenv.mkDerivation ({
++ (optional (perl != null) perl) ++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig); ++ (optional javaAwtGtk pkgconfig);
buildInputs = [ gmp mpfr mpc libelf ] buildInputs = [ gmp mpfr libmpc libelf ]
++ (optional (cloog != null) cloog) ++ (optional (cloog != null) cloog)
++ (optional (isl != null) isl) ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib) ++ (optional (zlib != null) zlib)
@ -323,7 +323,7 @@ stdenv.mkDerivation ({
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
--with-gmp=${gmp} --with-gmp=${gmp}
--with-mpfr=${mpfr} --with-mpfr=${mpfr}
--with-mpc=${mpc} --with-mpc=${libmpc}
${if libelf != null then "--with-libelf=${libelf}" else ""} ${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch --disable-libstdcxx-pch
--without-included-gettext --without-included-gettext

View File

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

View File

@ -71,7 +71,7 @@ in cabal.mkDerivation (self: rec {
chmod -R u+w $topDir/shims chmod -R u+w $topDir/shims
''; '';
postInstall = '' postInstall = ''
PATH=$out/bin:${Cabal}/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${gcc.gcc}/lib64:$LD_LIBRARY_PATH \ PATH=$out/bin:${Cabal}/bin:$PATH LD_LIBRARY_PATH=${gmp}/lib:${gcc.cc}/lib64:$LD_LIBRARY_PATH \
env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \ env -u GHC_PACKAGE_PATH $out/bin/ghcjs-boot \
--dev \ --dev \
--with-cabal ${cabalInstall}/bin/cabal \ --with-cabal ${cabalInstall}/bin/cabal \

View File

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

View File

@ -7,7 +7,7 @@
assert stdenv.isLinux; assert stdenv.isLinux;
let let
realGcc = stdenv.cc.gcc; realGcc = stdenv.cc.cc;
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "julia"; pname = "julia";

View File

@ -2,7 +2,7 @@
let let
version = "3.3"; version = "3.3";
gccReal = if (stdenv.cc.gcc or null) == null then stdenv.cc else stdenv.cc.gcc; gccReal = if (stdenv.cc.cc or null) == null then stdenv.cc else stdenv.cc.cc;
in in
stdenv.mkDerivation { stdenv.mkDerivation {
@ -29,7 +29,7 @@ stdenv.mkDerivation {
sha256 = "15mrvw43s4frk1j49qr4v5viq68h8qlf10qs6ghd6mrsmgj5vddi"; sha256 = "15mrvw43s4frk1j49qr4v5viq68h8qlf10qs6ghd6mrsmgj5vddi";
}; };
passthru = { gcc = stdenv.cc.gcc; }; passthru = { cc = stdenv.cc.cc; };
meta = { meta = {
homepage = http://clang.llvm.org/; homepage = http://clang.llvm.org/;

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation {
"-DCLANG_PATH_TO_LLVM_BUILD=${llvm}" "-DCLANG_PATH_TO_LLVM_BUILD=${llvm}"
] ++ ] ++
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include") ++ (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}"); (stdenv.lib.optional (stdenv.cc.cc != null) "-DGCC_INSTALL_PREFIX=${stdenv.cc.cc}");
# Clang expects to find LLVMgold in its own prefix # Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix # Clang expects to find sanitizer libraries in its own prefix
@ -34,7 +34,7 @@ stdenv.mkDerivation {
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/ ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
''; '';
passthru.gcc = stdenv.cc.gcc; passthru.cc = stdenv.cc.cc;
enableParallelBuilding = true; enableParallelBuilding = true;

View File

@ -1,4 +1,4 @@
{stdenv, fetch, fetchpatch, llvm, gmp, mpfr, mpc, ncurses, zlib, version}: {stdenv, fetch, fetchpatch, llvm, gmp, mpfr, libmpc, ncurses, zlib, version}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dragonegg-${version}"; name = "dragonegg-${version}";
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
# The gcc the plugin will be built for (the same used building dragonegg) # The gcc the plugin will be built for (the same used building dragonegg)
GCC = "gcc"; GCC = "gcc";
buildInputs = [ llvm gmp mpfr mpc ncurses zlib ]; buildInputs = [ llvm gmp mpfr libmpc ncurses zlib ];
installPhase = '' installPhase = ''
mkdir -p $out/lib $out/share/doc/${name} mkdir -p $out/lib $out/share/doc/${name}

View File

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

View File

@ -16,9 +16,13 @@ let
in in
runCommand "openjdk-bootstrap" {} '' runCommand "openjdk-bootstrap" {} ''
xz -dc ${src} | sed "s/e*-glibc-[^/]*/$(basename ${glibc})/g" | tar xv tar xvf ${src}
mv openjdk-bootstrap $out mv openjdk-bootstrap $out
for i in $out/bin/*; do
patchelf --set-interpreter ${glibc}/lib/ld-linux*.so.2 $i
done
# Temporarily, while NixOS's OpenJDK bootstrap tarball doesn't have PaX markings: # Temporarily, while NixOS's OpenJDK bootstrap tarball doesn't have PaX markings:
exes=$(${file}/bin/file $out/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//') exes=$(${file}/bin/file $out/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
for file in $exes; do for file in $exes; do

View File

@ -174,7 +174,7 @@ let result = stdenv.mkDerivation rec {
*/ */
libraries = libraries =
[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] ++ [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 []); (if swingSupport then [xlibs.libX11 xlibs.libXext xlibs.libXtst xlibs.libXi xlibs.libXp xlibs.libXt xlibs.libXrender stdenv.cc.cc] else []);
passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins"; passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";

View File

@ -56,7 +56,7 @@ in stdenv.mkDerivation {
cp -r bin "$out/bin" cp -r bin "$out/bin"
'' + (if stdenv.isLinux then '' '' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \ --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
"$out/bin/rustc" "$out/bin/rustc"
'' else ""); '' else "");
}; };

View File

@ -67,7 +67,7 @@ stdenv.mkDerivation {
cp -r bin "$out/bin" cp -r bin "$out/bin"
'' + (if stdenv.isLinux then '' '' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/" \ --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/" \
"$out/bin/rustc" "$out/bin/rustc"
'' else ""); '' else "");
}; };

View File

@ -1,6 +1,6 @@
{stdenv, fetchurl, guile, texinfo}: {stdenv, fetchurl, guile, texinfo}:
assert stdenv ? cc && stdenv.cc ? gcc && stdenv.cc.gcc != null; assert stdenv ? cc && stdenv.cc.cc.isGNU or false;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "guile-lib-0.2.2"; name = "guile-lib-0.2.2";
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
preCheck = preCheck =
# Make `libgcc_s.so' visible for `pthread_cancel'. # Make `libgcc_s.so' visible for `pthread_cancel'.
'' export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.gcc}/lib*/libgcc_s.so)):$LD_LIBRARY_PATH" '' export LD_LIBRARY_PATH="$(dirname $(echo ${stdenv.cc.cc}/lib*/libgcc_s.so)):$LD_LIBRARY_PATH"
''; '';
meta = { meta = {

View File

@ -33,7 +33,7 @@ stdenv.mkDerivation {
sha256 = "00935c4vxfj2h3x354g75qdazswwissbwc7kj5k05l1m3lizikf6"; sha256 = "00935c4vxfj2h3x354g75qdazswwissbwc7kj5k05l1m3lizikf6";
}; };
libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.gcc ]; libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc ];
dontStrip = true; dontStrip = true;
} }

View File

@ -4,7 +4,7 @@
: who configured the system : who configured the system
cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1` cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
+cf_time='Thu Jan 1 00:00:00 UTC 1970' +cf_time='Thu Jan 1 00:00:01 UTC 1970'
+ +
case "$cf_by" in case "$cf_by" in
"") "")

View File

@ -3,8 +3,8 @@
, libX11, libICE, libSM, useX11 ? (stdenv.isLinux || stdenv.isDarwin) }: , libX11, libICE, libSM, useX11 ? (stdenv.isLinux || stdenv.isDarwin) }:
let let
version = "1.8.12"; version = "1.8.14";
sha256 = "07jhcalg00i2rx5zrgk73rg0vm7lzi5q5z2gscrbl999ipr2h569"; sha256 = "06hzrvlpm91c4a4a19bk5pzxvs00fwd7fjd3njd3pjd4lr854hl3";
inherit (stdenv) lib; inherit (stdenv) lib;

View File

@ -5,7 +5,7 @@ let
bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64"; bits = stdenv.lib.optionalString (stdenv.system == "x86_64-linux") "64";
libPath = stdenv.lib.makeLibraryPath libPath = stdenv.lib.makeLibraryPath
[ stdenv.cc.libc stdenv.cc.gcc ] + ":${stdenv.cc.gcc}/lib64"; [ stdenv.cc.libc stdenv.cc.cc ] + ":${stdenv.cc.cc}/lib64";
patchLib = x: "patchelf --set-rpath ${libPath} ${x}"; patchLib = x: "patchelf --set-rpath ${libPath} ${x}";
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {

View File

@ -7,7 +7,7 @@
with stdenv.lib; with stdenv.lib;
assert !stdenv.isDarwin -> stdenv.cc ? gcc; assert !stdenv.isDarwin -> stdenv.cc.cc.isGNU or false;
# TODO: # TODO:
# * Add gio-module-fam # * Add gio-module-fam

View File

@ -8,7 +8,7 @@
, withGd ? false, gd ? null, libpng ? null , withGd ? false, gd ? null, libpng ? null
}: }:
assert stdenv.cc ? gcc; assert stdenv.cc.cc.isGNU or false;
let let
build = import ./common.nix; build = import ./common.nix;
@ -33,9 +33,9 @@ in
# libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
# any special hack. # any special hack.
preInstall = '' preInstall = ''
if [ -f ${stdenv.cc.gcc}/lib/libgcc_s.so.1 ]; then if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then
mkdir -p $out/lib mkdir -p $out/lib
cp ${stdenv.cc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
fi fi
''; '';

View File

@ -8,11 +8,11 @@
# (icu is a ~30 MB dependency, the rest is very small in comparison) # (icu is a ~30 MB dependency, the rest is very small in comparison)
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "harfbuzz-0.9.36"; name = "harfbuzz-0.9.37";
src = fetchurl { src = fetchurl {
url = "http://www.freedesktop.org/software/harfbuzz/release/${name}.tar.bz2"; url = "http://www.freedesktop.org/software/harfbuzz/release/${name}.tar.bz2";
sha256 = "3bfbf7b016167ee6b2a2f83948fef75cc1253081873d6a91022161815956b9be"; sha256 = "01q22an29ni6b7yaial7l2zq0yyr8dk2230x7n31dbfy88w3npr5";
}; };
configureFlags = [ configureFlags = [

View File

@ -5,7 +5,7 @@ diff -ur libgcrypt-1.5.3.orig/configure libgcrypt-1.5.3/configure
BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
+BUILD_TIMESTAMP=1970-01-01T00:00+0000 +BUILD_TIMESTAMP=1970-01-01T00:01+0000
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF

View File

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "1dapxzxl1naghf342fwfc2w2f2c5hb9gr1a1s4n8dsqn26kybx1z"; sha256 = "1dapxzxl1naghf342fwfc2w2f2c5hb9gr1a1s4n8dsqn26kybx1z";
}; };
postPatch = "sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:00+0000/' -i ./configure"; postPatch = "sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure";
# If architecture-dependent MO files aren't available, they're generated # If architecture-dependent MO files aren't available, they're generated
# during build, so we need gettext for cross-builds. # during build, so we need gettext for cross-builds.

View File

@ -1,11 +1,11 @@
{ stdenv, fetchurl, nasm }: { stdenv, fetchurl, nasm }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libjpeg-turbo-1.3.1"; name = "libjpeg-turbo-1.4.0";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/libjpeg-turbo/${name}.tar.gz"; url = "mirror://sourceforge/libjpeg-turbo/${name}.tar.gz";
sha256 = "1fbgcvlnn3d5gvf0v9jnlcabpv2z3nwxclzyabahxi6x2xs90cn1"; sha256 = "1vmv5ciqq98gi2ishqbvlx9hsk7sl06lr6xkcgw480jiddadhfnr";
}; };
buildInputs = [ nasm ]; buildInputs = [ nasm ];
@ -13,9 +13,12 @@ stdenv.mkDerivation rec {
doCheck = true; doCheck = true;
checkTarget = "test"; checkTarget = "test";
meta = { meta = with stdenv.lib; {
homepage = http://libjpeg-turbo.virtualgl.org/; homepage = http://libjpeg-turbo.virtualgl.org/;
description = "A faster (using SIMD) libjpeg implementation"; description = "A faster (using SIMD) libjpeg implementation";
license = stdenv.lib.licenses.free; license = licenses.ijg; # and some parts under other BSD-style licenses
platforms = platforms.all;
maintainers = [ maintainers.vcunat ];
}; };
} }

View File

@ -1,10 +1,12 @@
{ fetchurl, stdenv, gmp, mpfr }: { fetchurl, stdenv, gmp, mpfr }:
let
version = "1.0.1";
in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mpc-1.0.1"; name = "libmpc-${version}"; # to avoid clash with the MPD client
src = fetchurl { src = fetchurl {
url = "http://www.multiprecision.org/mpc/download/${name}.tar.gz"; url = "http://www.multiprecision.org/mpc/download/mpc-${version}.tar.gz";
sha1 = "vxg0rkyn4cs40wr2cp6bbcyr1nnijzlc"; sha1 = "vxg0rkyn4cs40wr2cp6bbcyr1nnijzlc";
}; };

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
"USE_ZLIB=1" "USE_OPENSSL=1" "USE_ZLIB=1" "USE_OPENSSL=1"
''PREFIX=$(out)'' ''PREFIX=$(out)''
] ]
++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}" ++ stdenv.lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}" ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
; ;
meta = { meta = {

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
"LIBRE_INC=${libre}/include/re" "LIBRE_INC=${libre}/include/re"
''PREFIX=$(out)'' ''PREFIX=$(out)''
] ]
++ stdenv.lib.optional (stdenv.cc.gcc != null) "SYSROOT_ALT=${stdenv.cc.gcc}" ++ stdenv.lib.optional (stdenv.cc.cc != null) "SYSROOT_ALT=${stdenv.cc.cc}"
++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}" ++ stdenv.lib.optional (stdenv.cc.libc != null) "SYSROOT=${stdenv.cc.libc}"
; ;
meta = { meta = {

View File

@ -57,8 +57,8 @@ stdenv.mkDerivation rec {
''; '';
postFixup = if stdenv.isDarwin then '' postFixup = if stdenv.isDarwin then ''
install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.gcc}/lib/libgcc_s.1.dylib $out/bin/d8 install_name_tool -change /usr/local/lib/libv8.dylib $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc}/lib/libgcc_s.1.dylib $out/bin/d8
install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.gcc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib install_name_tool -id $out/lib/libv8.dylib -change /usr/lib/libgcc_s.1.dylib ${stdenv.cc.cc}/lib/libgcc_s.1.dylib $out/lib/libv8.dylib
'' else null; '' else null;
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
buildInputs = [ unzip ]; buildInputs = [ unzip ];
libraries = [ xlibs.libXpm xlibs.libXt xlibs.libX11 xlibs.libICE xlibs.libSM stdenv.cc.gcc ]; libraries = [ xlibs.libXpm xlibs.libXt xlibs.libX11 xlibs.libICE xlibs.libSM stdenv.cc.cc ];
meta = { meta = {
homepage = http://java.sun.com/products/sjwtoolkit/download.html; homepage = http://java.sun.com/products/sjwtoolkit/download.html;

View File

@ -87,7 +87,7 @@ in stdenv.mkDerivation rec {
# Create wrappers # Create wrappers
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/clinfo patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/clinfo
patchelf --set-rpath ${stdenv.cc.gcc}/lib64:${stdenv.cc.gcc}/lib $out/bin/clinfo patchelf --set-rpath ${stdenv.cc.cc}/lib64:${stdenv.cc.cc}/lib $out/bin/clinfo
# Fix modes # Fix modes
find "$out/" -type f -exec chmod 644 {} \; find "$out/" -type f -exec chmod 644 {} \;

View File

@ -1,6 +1,6 @@
{ stdenv, fetchurl, writeTextFile, coreutils, gnumake, gcc, gnutar, bzip2 { stdenv, fetchurl, writeTextFile, coreutils, gnumake, gcc, gnutar, bzip2
, gnugrep, gnused, gawk, diffutils, patch , gnugrep, gnused, gawk, diffutils, patch
, gmp, mpfr, mpc }: , gmp, mpfr, libmpc }:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "avr-gcc-libc"; name = "avr-gcc-libc";
@ -40,7 +40,7 @@ stdenv.mkDerivation {
mkdir -p "$out" mkdir -p "$out"
export > env-vars export > env-vars
for i in "${gmp}" "${mpfr}" "${mpc}"; do for i in "${gmp}" "${mpfr}" "${libmpc}"; do
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$i/include " export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$i/include "
export NIX_LDFLAGS="$NIX_LDFLAGS -L$i/lib " export NIX_LDFLAGS="$NIX_LDFLAGS -L$i/lib "
done done

View File

@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
for i in emulator emulator-arm emulator-mips emulator-x86 mksdcard for i in emulator emulator-arm emulator-mips emulator-x86 mksdcard
do do
patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i
patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib $i patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib $i
done done
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") '' ${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
for i in emulator64-arm emulator64-mips emulator64-x86 for i in emulator64-arm emulator64-mips emulator64-x86
do do
patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $i patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 $i
patchelf --set-rpath ${stdenv.cc.gcc}/lib64 $i patchelf --set-rpath ${stdenv.cc.cc}/lib64 $i
done done
''} ''}
@ -84,7 +84,7 @@ stdenv.mkDerivation rec {
patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
wrapProgram `pwd`/monitor \ wrapProgram `pwd`/monitor \
--prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.gcc}/lib --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib
cd ../.. cd ../..
'' ''
@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
wrapProgram `pwd`/monitor \ wrapProgram `pwd`/monitor \
--prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.gcc}/lib --prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib
cd ../.. cd ../..
'' ''

View File

@ -31,26 +31,26 @@ stdenv.mkDerivation {
# These binaries need to find libstdc++ and libgcc_s # These binaries need to find libstdc++ and libgcc_s
for i in aidl libLLVM.so for i in aidl libLLVM.so
do do
patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib $i patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib $i
done done
# These binaries need to find libstdc++, libgcc_s and libraries in the current folder # These binaries need to find libstdc++, libgcc_s and libraries in the current folder
for i in libbcc.so libbcinfo.so libclang.so llvm-rs-cc for i in libbcc.so libbcinfo.so libclang.so llvm-rs-cc
do do
patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib:`pwd` $i patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:`pwd` $i
done done
# These binaries also need zlib in addition to libstdc++ # These binaries also need zlib in addition to libstdc++
for i in zipalign for i in zipalign
do do
patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i
patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib:${zlib_32bit}/lib $i patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib $i
done done
# These binaries need to find libstdc++, libgcc_s, and zlib # These binaries need to find libstdc++, libgcc_s, and zlib
for i in aapt dexdump for i in aapt dexdump
do do
patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib:${zlib_32bit}/lib $i patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib:${zlib_32bit}/lib $i
done done
''} ''}

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation {
for i in adb fastboot for i in adb fastboot
do do
patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i patchelf --set-interpreter ${stdenv_32bit.cc.libc}/lib/ld-linux.so.2 $i
patchelf --set-rpath ${stdenv_32bit.cc.gcc}/lib $i patchelf --set-rpath ${stdenv_32bit.cc.cc}/lib $i
done done
''} ''}
''; '';

View File

@ -16,12 +16,4 @@ buildPerlPackage rec {
INCLUDE = ${db}/include INCLUDE = ${db}/include
EOF EOF
''; '';
# I don't know about perl paths, but PERL5LIB env var is managed through
# lib/perl5/site_perl, and the *.pm should be inside lib/perl5/site_perl/...
# for other packages to get that in the PERL5LIB env var.
postInstall = ''
mkdir -p $out/lib/perl5/site_perl/
cp -R $out/lib/perl5/5* $out/lib/perl5/site_perl
'';
} }

View File

@ -11,6 +11,9 @@ perl.stdenv.mkDerivation (
# Prevent CPAN downloads. # Prevent CPAN downloads.
PERL_AUTOINSTALL = "--skipdeps"; PERL_AUTOINSTALL = "--skipdeps";
# Avoid creating perllocal.pod, which contains a timestamp
installTargets = "pure_install";
# From http://wiki.cpantesters.org/wiki/CPANAuthorNotes: "allows # From http://wiki.cpantesters.org/wiki/CPANAuthorNotes: "allows
# authors to skip certain tests (or include certain tests) when # authors to skip certain tests (or include certain tests) when
# the results are not being monitored by a human being." # the results are not being monitored by a human being."

View File

@ -6,7 +6,7 @@ let
atomEnv = buildEnv { atomEnv = buildEnv {
name = "env-atom"; name = "env-atom";
paths = [ paths = [
stdenv.cc.gcc zlib glib dbus gtk atk pango freetype libgnome_keyring3 stdenv.cc.cc zlib glib dbus gtk atk pango freetype libgnome_keyring3
fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss fontconfig gdk_pixbuf cairo cups expat libgpgerror alsaLib nspr gconf nss
xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst xlibs.libXrender xlibs.libX11 xlibs.libXext xlibs.libXdamage xlibs.libXtst
xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr xlibs.libXcomposite xlibs.libXi xlibs.libXfixes xlibs.libXrandr

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation {
cp -r bin "$out/bin" cp -r bin "$out/bin"
'' + (if stdenv.isLinux then '' '' + (if stdenv.isLinux then ''
patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \ patchelf --interpreter "${stdenv.glibc}/lib/${stdenv.cc.dynamicLinker}" \
--set-rpath "${stdenv.cc.gcc}/lib/:${stdenv.cc.gcc}/lib64/:${zlib}/lib" \ --set-rpath "${stdenv.cc.cc}/lib/:${stdenv.cc.cc}/lib64/:${zlib}/lib" \
"$out/bin/cargo" "$out/bin/cargo"
'' else ""); '' else "");
} }

View File

@ -17,19 +17,19 @@ stdenv.mkDerivation {
links = extraConfig : (runCommand "ccache-links" { } links = extraConfig : (runCommand "ccache-links" { }
'' ''
mkdir -p $out/bin mkdir -p $out/bin
if [ -x "${gcc.gcc}/bin/gcc" ]; then if [ -x "${gcc.cc}/bin/gcc" ]; then
cat > $out/bin/gcc << EOF cat > $out/bin/gcc << EOF
#!/bin/sh #!/bin/sh
${extraConfig} ${extraConfig}
exec ${ccache}/bin/ccache ${gcc.gcc}/bin/gcc "\$@" exec ${ccache}/bin/ccache ${gcc.cc}/bin/gcc "\$@"
EOF EOF
chmod +x $out/bin/gcc chmod +x $out/bin/gcc
fi fi
if [ -x "${gcc.gcc}/bin/g++" ]; then if [ -x "${gcc.cc}/bin/g++" ]; then
cat > $out/bin/g++ << EOF cat > $out/bin/g++ << EOF
#!/bin/sh #!/bin/sh
${extraConfig} ${extraConfig}
exec ${ccache}/bin/ccache ${gcc.gcc}/bin/g++ "\$@" exec ${ccache}/bin/ccache ${gcc.cc}/bin/g++ "\$@"
EOF EOF
chmod +x $out/bin/g++ chmod +x $out/bin/g++
fi fi

View File

@ -44,7 +44,7 @@ let
links = extraConfig : (runCommand "distcc-links" { } links = extraConfig : (runCommand "distcc-links" { }
'' ''
mkdir -p $out/bin mkdir -p $out/bin
if [ -x "${gcc.gcc}/bin/gcc" ]; then if [ -x "${gcc.cc}/bin/gcc" ]; then
cat > $out/bin/gcc << EOF cat > $out/bin/gcc << EOF
#!/bin/sh #!/bin/sh
${extraConfig} ${extraConfig}
@ -52,7 +52,7 @@ let
EOF EOF
chmod +x $out/bin/gcc chmod +x $out/bin/gcc
fi fi
if [ -x "${gcc.gcc}/bin/g++" ]; then if [ -x "${gcc.cc}/bin/g++" ]; then
cat > $out/bin/g++ << EOF cat > $out/bin/g++ << EOF
#!/bin/sh #!/bin/sh
${extraConfig} ${extraConfig}

Some files were not shown because too many files have changed in this diff Show More