treewide: simplify boolean logic

This commit is contained in:
Peder Bergebakken Sundt 2024-08-09 04:16:54 +02:00
parent 2cd969c108
commit 441708dd85
8 changed files with 15 additions and 15 deletions

View File

@ -20,9 +20,9 @@
}:
# Mutually exclusive options
assert withIcons -> (withNerdIcons == false && withEmojis == false);
assert withNerdIcons -> (withIcons == false && withEmojis == false);
assert withEmojis -> (withIcons == false && withNerdIcons == false);
assert withIcons -> (!withNerdIcons && !withEmojis);
assert withNerdIcons -> (!withIcons && !withEmojis);
assert withEmojis -> (!withIcons && !withNerdIcons);
stdenv.mkDerivation (finalAttrs: {
pname = "nnn";

View File

@ -91,9 +91,9 @@ stdenv.mkDerivation rec {
${lib.optionalString (nautilusSize != null) ("--size " + nautilusSize)} \
${lib.optionalString (panelOpacity != null) ("--panel-opacity " + panelOpacity)} \
${lib.optionalString (panelSize != null) ("--panel-size " + panelSize)} \
${lib.optionalString (roundedMaxWindow == true) "--roundedmaxwindow"} \
${lib.optionalString (nordColor == true) "--nordcolor"} \
${lib.optionalString (darkerColor == true) "--darkercolor"} \
${lib.optionalString roundedMaxWindow "--roundedmaxwindow"} \
${lib.optionalString nordColor "--nordcolor"} \
${lib.optionalString darkerColor "--darkercolor"} \
--dest $out/share/themes
jdupes --quiet --link-soft --recurse $out/share

View File

@ -4,9 +4,9 @@
, rLibrary ? false, cudaPackages, opencl-headers, ocl-icd, boost
, llvmPackages, openmpi, openjdk, swig, hadoop, R, rPackages, pandoc }:
assert doCheck -> mpiSupport != true;
assert openclSupport -> cudaSupport != true;
assert cudaSupport -> openclSupport != true;
assert doCheck -> !mpiSupport;
assert openclSupport -> !cudaSupport;
assert cudaSupport -> !openclSupport;
stdenv.mkDerivation rec {
pnameBase = "lightgbm";

View File

@ -22,7 +22,7 @@ assert ncclSupport -> (cudaSupport && !cudaPackages.nccl.meta.unsupported);
# 2) the R package creates a different binary shared
# object that isn't compatible with the regular CLI
# tests.
assert rLibrary -> doCheck != true;
assert rLibrary -> !doCheck;
let
# This ensures xgboost gets the correct libstdc++ when

View File

@ -34,8 +34,8 @@
cudaPackages,
}:
assert gpuSupport -> cudaSupport != true;
assert cudaSupport -> gpuSupport != true;
assert gpuSupport -> !cudaSupport;
assert cudaSupport -> !gpuSupport;
buildPythonPackage rec {
pname = "lightgbm";

View File

@ -69,7 +69,7 @@ rustPlatform.buildRustPackage rec {
};
# tests failed on x86_64-darwin with SIGILL: illegal instruction
doCheck = !(stdenv.system == "x86_64-darwin");
doCheck = stdenv.system != "x86_64-darwin";
checkFlags = [
# all try to make a network access

View File

@ -8,7 +8,7 @@
, nixosTests
}:
assert guiSupport -> enableMinimal == false;
assert guiSupport -> !enableMinimal;
stdenv.mkDerivation rec {
pname = "gnupg";

View File

@ -9,7 +9,7 @@
, nixosTests
}:
assert guiSupport -> enableMinimal == false;
assert guiSupport -> !enableMinimal;
stdenv.mkDerivation rec {
pname = "gnupg";