* Provide "null" defaults for the optional dependencies, otherwise

binutilsCross gives an evaluation error.

svn path=/nixpkgs/trunk/; revision=27138
This commit is contained in:
Eelco Dolstra 2011-05-04 12:22:56 +00:00
parent 2ff77d4134
commit 92bf0b92d3

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, noSysDirs, zlib, cross ? null, gold ? false, bison, flex2535, bc, dejagnu}:
{ stdenv, fetchurl, noSysDirs, zlib, cross ? null, gold ? false, bison ? null, flex2535 ? null, bc ? null, dejagnu ? null }:
let
basename = "binutils-2.21";
@ -18,10 +18,9 @@ stdenv.mkDerivation rec {
./new-dtags.patch
];
buildInputs = [ zlib ] ++ stdenv.lib.optional gold [dejagnu flex2535 bison
# Some Gold tests require this:
bc] ;
buildInputs =
[ zlib ]
++ stdenv.lib.optional gold [dejagnu flex2535 bison /* Some Gold tests require this: */ bc];
inherit noSysDirs;
@ -42,7 +41,7 @@ stdenv.mkDerivation rec {
+ stdenv.lib.optionalString (stdenv.system == "mips64-linux")
" --enable-fix-loongson2f-nop"
+ stdenv.lib.optionalString (cross != null) " --target=${cross.config}"
+ stdenv.lib.optionalString gold " --enable-gold" ;
+ stdenv.lib.optionalString gold " --enable-gold";
meta = {
description = "GNU Binutils, tools for manipulating binaries (linker, assembler, etc.)";