nixpkgs/pkgs/build-support/gcc-wrapper/default.nix
Eelco Dolstra de13527000 * Finally got stdenv-nix-linux working again. Still not perfect,
though.
* libxml2: upgrade to latest.
* octavefront/rna: keep debug info.

svn path=/nixpkgs/trunk/; revision=830
2004-03-11 17:26:14 +00:00

27 lines
1 KiB
Nix

# The Nix `gcc' derivation is not directly usable, since it doesn't
# know where the C library and standard header files are. Therefore
# the compiler produced by that package cannot be installed directly
# in a user environment and used from the command line. This
# derivation provides a wrapper that sets up the right environment
# variables so that the compiler and the linker just "work".
{ name, stdenv, nativeTools, nativeGlibc, nativePrefix ? ""
, gcc ? null, glibc ? null, binutils ? null
}:
assert nativeTools -> nativePrefix != "";
assert !nativeTools -> gcc != null && binutils != null;
assert !nativeGlibc -> glibc != null;
derivation {
system = stdenv.system;
builder = ./builder.sh;
setupHook = ./setup-hook.sh;
gccWrapper = ./gcc-wrapper.sh;
ldWrapper = ./ld-wrapper.sh;
inherit name stdenv nativeTools nativeGlibc nativePrefix gcc glibc binutils;
langC = if nativeTools then true else gcc.langC;
langCC = if nativeTools then true else gcc.langCC;
langF77 = if nativeTools then false else gcc.langF77;
}