Clean up redundant "if condition then true else false"

This commit is contained in:
Eelco Dolstra 2012-12-28 19:57:47 +01:00
parent 84779a6f7d
commit 88b11196c1
7 changed files with 11 additions and 11 deletions

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation (rec {
done done
'' else ""; '' else "";
dontStrip = if ! ocaml.nativeCompilers then true else false; dontStrip = !ocaml.nativeCompilers;
meta = { meta = {
homepage = http://www.cis.upenn.edu/~bcpierce/unison/; homepage = http://www.cis.upenn.edu/~bcpierce/unison/;

View File

@ -129,7 +129,7 @@ stdenv.mkDerivation ({
enableMultilib; }; enableMultilib; };
# ghdl does not build fine with parallel building # ghdl does not build fine with parallel building
enableParallelBuilding = if langVhdl then false else true; enableParallelBuilding = !langVhdl;
meta = { meta = {
homepage = "http://gcc.gnu.org/"; homepage = "http://gcc.gnu.org/";

View File

@ -243,7 +243,7 @@ stdenv.mkDerivation ({
enableMultilib version; }; enableMultilib version; };
# ghdl does not build fine with parallel building # ghdl does not build fine with parallel building
enableParallelBuilding = if langVhdl then false else true; enableParallelBuilding = !langVhdl;
meta = { meta = {
homepage = http://gcc.gnu.org/; homepage = http://gcc.gnu.org/;

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-static-libgcc"; NIX_CFLAGS_COMPILE = "-static-libgcc";
crossAttrs = { crossAttrs = {
dontStrip = if static then true else false; dontStrip = static;
} // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {
configurePhase='' configurePhase=''
installFlags="BINARY_PATH=$out/bin INCLUDE_PATH=$out/include LIBRARY_PATH=$out/lib" installFlags="BINARY_PATH=$out/bin INCLUDE_PATH=$out/include LIBRARY_PATH=$out/lib"

View File

@ -74,7 +74,7 @@ stdenv.mkDerivation {
''; '';
# Cross stripping hurts. # Cross stripping hurts.
dontStrip = if cross != null then true else false; dontStrip = cross != null;
makeFlags = [ crossMakeFlag "VERBOSE=1" ]; makeFlags = [ crossMakeFlag "VERBOSE=1" ];

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
${if linkStatic then "--enable-static --disable-shared" else ""} ${if linkStatic then "--enable-static --disable-shared" else ""}
''; '';
dontDisableStatic = if linkStatic then true else false; dontDisableStatic = linkStatic;
CFLAGS = if stdenv ? isDietLibC then "-DHAVE_INET_NTOA_R_2_ARGS=1" else ""; CFLAGS = if stdenv ? isDietLibC then "-DHAVE_INET_NTOA_R_2_ARGS=1" else "";
LDFLAGS = if linkStatic then "-static" else ""; LDFLAGS = if linkStatic then "-static" else "";

View File

@ -2043,7 +2043,7 @@ let
gettext which noSysDirs; gettext which noSysDirs;
# bootstrapping a profiled compiler does not work in the sheevaplug: # bootstrapping a profiled compiler does not work in the sheevaplug:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
profiledCompiler = if stdenv.isArm then false else true; profiledCompiler = !stdenv.isArm;
# When building `gcc.crossDrv' (a "Canadian cross", with host == target # When building `gcc.crossDrv' (a "Canadian cross", with host == target
# and host != build), `cross' must be null but the cross-libc must still # and host != build), `cross' must be null but the cross-libc must still
@ -2064,7 +2064,7 @@ let
# bootstrapping a profiled compiler does not work in the sheevaplug: # bootstrapping a profiled compiler does not work in the sheevaplug:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
profiledCompiler = if stdenv.system == "armv5tel-linux" then false else true; profiledCompiler = !stdenv.system == "armv5tel-linux";
})); }));
gcc46_real = lowPrio (wrapGCC (callPackage ../development/compilers/gcc/4.6 { gcc46_real = lowPrio (wrapGCC (callPackage ../development/compilers/gcc/4.6 {
@ -2072,7 +2072,7 @@ let
# bootstrapping a profiled compiler does not work in the sheevaplug: # bootstrapping a profiled compiler does not work in the sheevaplug:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
profiledCompiler = if stdenv.isArm then false else true; profiledCompiler = !stdenv.isArm;
# When building `gcc.crossDrv' (a "Canadian cross", with host == target # When building `gcc.crossDrv' (a "Canadian cross", with host == target
# and host != build), `cross' must be null but the cross-libc must still # and host != build), `cross' must be null but the cross-libc must still
@ -8254,14 +8254,14 @@ let
speed_dreams = callPackage ../games/speed-dreams { speed_dreams = callPackage ../games/speed-dreams {
# Torcs wants to make shared libraries linked with plib libraries (it provides static). # Torcs wants to make shared libraries linked with plib libraries (it provides static).
# i686 is the only platform I know than can do that linking without plib built with -fPIC # i686 is the only platform I know than can do that linking without plib built with -fPIC
plib = plib.override { enablePIC = if stdenv.isi686 then false else true; }; plib = plib.override { enablePIC = !stdenv.isi686; };
libpng = libpng12; libpng = libpng12;
}; };
torcs = callPackage ../games/torcs { torcs = callPackage ../games/torcs {
# Torcs wants to make shared libraries linked with plib libraries (it provides static). # Torcs wants to make shared libraries linked with plib libraries (it provides static).
# i686 is the only platform I know than can do that linking without plib built with -fPIC # i686 is the only platform I know than can do that linking without plib built with -fPIC
plib = plib.override { enablePIC = if stdenv.isi686 then false else true; }; plib = plib.override { enablePIC = !stdenv.isi686; };
}; };
trigger = callPackage ../games/trigger { }; trigger = callPackage ../games/trigger { };