From 88b11196c130b6bda5fd2e57729e876527c63377 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 28 Dec 2012 19:57:47 +0100 Subject: [PATCH] Clean up redundant "if condition then true else false" --- pkgs/applications/networking/sync/unison/default.nix | 2 +- pkgs/development/compilers/gcc/4.3/default.nix | 2 +- pkgs/development/compilers/gcc/4.4/default.nix | 2 +- pkgs/development/libraries/zlib/default.nix | 2 +- pkgs/os-specific/linux/uclibc/default.nix | 2 +- pkgs/tools/networking/curl/default.nix | 2 +- pkgs/top-level/all-packages.nix | 10 +++++----- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/networking/sync/unison/default.nix b/pkgs/applications/networking/sync/unison/default.nix index ea30903fb383..35dd2d2a7d02 100644 --- a/pkgs/applications/networking/sync/unison/default.nix +++ b/pkgs/applications/networking/sync/unison/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation (rec { done '' else ""; - dontStrip = if ! ocaml.nativeCompilers then true else false; + dontStrip = !ocaml.nativeCompilers; meta = { homepage = http://www.cis.upenn.edu/~bcpierce/unison/; diff --git a/pkgs/development/compilers/gcc/4.3/default.nix b/pkgs/development/compilers/gcc/4.3/default.nix index 04e9f25fedfd..73680996a837 100644 --- a/pkgs/development/compilers/gcc/4.3/default.nix +++ b/pkgs/development/compilers/gcc/4.3/default.nix @@ -129,7 +129,7 @@ stdenv.mkDerivation ({ enableMultilib; }; # ghdl does not build fine with parallel building - enableParallelBuilding = if langVhdl then false else true; + enableParallelBuilding = !langVhdl; meta = { homepage = "http://gcc.gnu.org/"; diff --git a/pkgs/development/compilers/gcc/4.4/default.nix b/pkgs/development/compilers/gcc/4.4/default.nix index 09609894ac67..804a797bac12 100644 --- a/pkgs/development/compilers/gcc/4.4/default.nix +++ b/pkgs/development/compilers/gcc/4.4/default.nix @@ -243,7 +243,7 @@ stdenv.mkDerivation ({ enableMultilib version; }; # ghdl does not build fine with parallel building - enableParallelBuilding = if langVhdl then false else true; + enableParallelBuilding = !langVhdl; meta = { homepage = http://gcc.gnu.org/; diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 5e1ddf839516..ec47c35c1530 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-static-libgcc"; crossAttrs = { - dontStrip = if static then true else false; + dontStrip = static; } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { configurePhase='' installFlags="BINARY_PATH=$out/bin INCLUDE_PATH=$out/include LIBRARY_PATH=$out/lib" diff --git a/pkgs/os-specific/linux/uclibc/default.nix b/pkgs/os-specific/linux/uclibc/default.nix index 0e6467ed184b..e7cce315e8c6 100644 --- a/pkgs/os-specific/linux/uclibc/default.nix +++ b/pkgs/os-specific/linux/uclibc/default.nix @@ -74,7 +74,7 @@ stdenv.mkDerivation { ''; # Cross stripping hurts. - dontStrip = if cross != null then true else false; + dontStrip = cross != null; makeFlags = [ crossMakeFlag "VERBOSE=1" ]; diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 1d08fc7228b2..c6e7ccd1fa2d 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { ${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 ""; LDFLAGS = if linkStatic then "-static" else ""; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c13072a99fcc..968418af9289 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2043,7 +2043,7 @@ let gettext which noSysDirs; # bootstrapping a profiled compiler does not work in the sheevaplug: # 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 # 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: # 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 { @@ -2072,7 +2072,7 @@ let # bootstrapping a profiled compiler does not work in the sheevaplug: # 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 # and host != build), `cross' must be null but the cross-libc must still @@ -8254,14 +8254,14 @@ let speed_dreams = callPackage ../games/speed-dreams { # 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 - plib = plib.override { enablePIC = if stdenv.isi686 then false else true; }; + plib = plib.override { enablePIC = !stdenv.isi686; }; libpng = libpng12; }; torcs = callPackage ../games/torcs { # 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 - plib = plib.override { enablePIC = if stdenv.isi686 then false else true; }; + plib = plib.override { enablePIC = !stdenv.isi686; }; }; trigger = callPackage ../games/trigger { };