diff --git a/pkgs/development/compilers/gcc-4.0/default.nix b/pkgs/development/compilers/gcc-4.0/default.nix index 49a87de057bf..5d81ecbfd74d 100644 --- a/pkgs/development/compilers/gcc-4.0/default.nix +++ b/pkgs/development/compilers/gcc-4.0/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, noSysDirs , langC ? true, langCC ? true, langF77 ? false , profiledCompiler ? false +,gmp ? null , mpfr ? null }: assert langC; @@ -20,6 +21,11 @@ stdenv.mkDerivation { inherit noSysDirs langC langCC langF77 profiledCompiler; + buildInputs = [] + ++ (if gmp != null then [gmp] else []) + ++ (if mpfr != null then [mpfr] else []) + ; + configureFlags = " --disable-multilib --disable-libstdcxx-pch @@ -29,7 +35,7 @@ stdenv.mkDerivation { concatStrings (intersperse "," ( optional langC "c" ++ optional langCC "c++" - ++ optional langF77 "f77" + ++ optional langF77 "f95" ) ) } diff --git a/pkgs/development/compilers/gcc-4.1/default.nix b/pkgs/development/compilers/gcc-4.1/default.nix index 39b3e4a28ebd..1b55469b5b58 100644 --- a/pkgs/development/compilers/gcc-4.1/default.nix +++ b/pkgs/development/compilers/gcc-4.1/default.nix @@ -2,15 +2,17 @@ , langC ? true, langCC ? true, langF77 ? false , profiledCompiler ? false , staticCompiler ? false +, gmp ? null +, mpfr ? null }: -assert langC; +assert langC || langF77; with import ../../../lib; stdenv.mkDerivation { name = "gcc-4.1.2"; - builder = ./builder.sh; + builder = if langF77 then ./fortran.sh else ./builder.sh; src = [(fetchurl { @@ -39,7 +41,7 @@ stdenv.mkDerivation { concatStrings (intersperse "," ( optional langC "c" ++ optional langCC "c++" - ++ optional langF77 "f77" + ++ optional langF77 "fortran" ) ) } @@ -50,6 +52,9 @@ stdenv.mkDerivation { passthru = { inherit langC langCC langF77; }; + buildInputs = [] ++ (if gmp != null then [gmp] else []) + ++ (if mpfr != null then [mpfr] else []); + meta = { homepage = "http://gcc.gnu.org/"; license = "GPL/LGPL";