···27 ccVersion = (builtins.parseDrvName cc.name).version;
28 ccName = (builtins.parseDrvName cc.name).name;
2930- libc_bin = if nativeLibc then null else libc.bin or libc;
31- libc_dev = if nativeLibc then null else libc.dev or libc;
32- libc_lib = if nativeLibc then null else libc.out or libc;
33- cc_solib = cc.lib or cc;
34- binutils_bin = if nativeTools then "" else binutils.bin or binutils;
35 # The wrapper scripts use 'cat' and 'grep', so we may need coreutils.
36- coreutils_bin = if nativeTools then "" else coreutils.bin or coreutils;
37in
3839stdenv.mkDerivation {
···27 ccVersion = (builtins.parseDrvName cc.name).version;
28 ccName = (builtins.parseDrvName cc.name).name;
2930+ libc_bin = if nativeLibc then null else getBin libc;
31+ libc_dev = if nativeLibc then null else getDev libc;
32+ libc_lib = if nativeLibc then null else getLib libc;
33+ cc_solib = getLib cc;
34+ binutils_bin = if nativeTools then "" else getBin binutils;
35 # The wrapper scripts use 'cat' and 'grep', so we may need coreutils.
36+ coreutils_bin = if nativeTools then "" else getBin coreutils;
37in
3839stdenv.mkDerivation {
+4-4
pkgs/build-support/gcc-wrapper-old/default.nix
···5# stdenv.mkDerivation provides a wrapper that sets up the right environment
6# variables so that the compiler and the linker just "work".
78-{ name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? ""
9, gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? ""
10, zlib ? null
11}:
···41 addFlags = ./add-flags;
4243 inherit nativeTools nativeLibc nativePrefix gcc;
44- gcc_lib = gcc.lib or gcc;
45 libc = if nativeLibc then null else libc;
46- libc_dev = if nativeLibc then null else libc.dev or libc;
47- libc_bin = if nativeLibc then null else libc.bin or libc;
48 binutils = if nativeTools then null else binutils;
49 # The wrapper scripts use 'cat', so we may need coreutils
50 coreutils = if nativeTools then null else coreutils;
···5# stdenv.mkDerivation provides a wrapper that sets up the right environment
6# variables so that the compiler and the linker just "work".
78+{ name ? "", stdenv, lib, nativeTools, nativeLibc, nativePrefix ? ""
9, gcc ? null, libc ? null, binutils ? null, coreutils ? null, shell ? ""
10, zlib ? null
11}:
···41 addFlags = ./add-flags;
4243 inherit nativeTools nativeLibc nativePrefix gcc;
44+ gcc_lib = lib.getLib gcc;
45 libc = if nativeLibc then null else libc;
46+ libc_dev = if nativeLibc then null else lib.getDev libc;
47+ libc_bin = if nativeLibc then null else lib.getBin libc;
48 binutils = if nativeTools then null else binutils;
49 # The wrapper scripts use 'cat', so we may need coreutils
50 coreutils = if nativeTools then null else coreutils;
···3334 for f in $(find $out); do
35 if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then
36- patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 \
37- --set-rpath $out/lib:${gcc.lib or gcc}/lib:${ncurses.out}/lib \
38 "$f" || true
39 fi
40 done
···3334 for f in $(find $out); do
35 if [ -f "$f" ] && patchelf "$f" 2> /dev/null; then
36+ patchelf --set-interpreter ${getLib glibc}/lib/ld-linux.so.2 \
37+ --set-rpath $out/lib:${getLib gcc}/lib:${ncurses.out}/lib \
38 "$f" || true
39 fi
40 done
+2-2
pkgs/development/compilers/ghc/6.10.2-binary.nix
···1-{stdenv, fetchurl, perl, libedit, ncurses, gmp}:
23stdenv.mkDerivation rec {
4 version = "6.10.2";
···47 '' else "");
4849 configurePhase = ''
50- ./configure --prefix=$out --with-gmp-libraries=${gmp.out}/lib --with-gmp-includes=${gmp.dev or gmp}/include
51 '';
5253 # Stripping combined with patchelf breaks the executables (they die
···32 # them to the RPATH so that the user doesn't have to set them in
33 # LD_LIBRARY_PATH.
34 NIX_LDFLAGS = map (path: "-rpath " + path) (
35- map (x: "${x}/lib") ([ stdenv.cc.cc ] ++ (map (x: x.lib or x.out) buildInputs))
36 # libpulsecommon.so is linked but not found otherwise
37- ++ lib.optionals pulseaudioSupport (map (x: "${x}/lib/pulseaudio") (toBuildInputs pkgArches (pkgs: [ pkgs.libpulseaudio ])))
038 );
3940 # Don't shrink the ELF RPATHs in order to keep the extra RPATH
···32 # them to the RPATH so that the user doesn't have to set them in
33 # LD_LIBRARY_PATH.
34 NIX_LDFLAGS = map (path: "-rpath " + path) (
35+ map (x: "${lib.getLib x}/lib") ([ stdenv.cc.cc ] ++ buildInputs)
36 # libpulsecommon.so is linked but not found otherwise
37+ ++ lib.optionals pulseaudioSupport (map (x: "${lib.getLib x}/lib/pulseaudio")
38+ (toBuildInputs pkgArches (pkgs: [ pkgs.libpulseaudio ])))
39 );
4041 # Don't shrink the ELF RPATHs in order to keep the extra RPATH
···223 # include it in the result, it *is* available to nix-env for queries.
224 meta = { }
225 # If the packager hasn't specified `outputsToInstall`, choose a default,
226- # namely `p.bin or p.out or p`;
227 # if he has specified it, it will be overridden below in `// meta`.
228 # Note: This default probably shouldn't be globally configurable.
229 # Services and users should specify outputs explicitly,
···223 # include it in the result, it *is* available to nix-env for queries.
224 meta = { }
225 # If the packager hasn't specified `outputsToInstall`, choose a default,
226+ # namely `lib.getBin p`;
227 # if he has specified it, it will be overridden below in `// meta`.
228 # Note: This default probably shouldn't be globally configurable.
229 # Services and users should specify outputs explicitly,