mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 17:14:00 +00:00
treewide: simplify boolean logic
This commit is contained in:
parent
2cd969c108
commit
441708dd85
@ -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";
|
||||
|
@ -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
|
||||
|
@ -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";
|
||||
|
@ -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
|
||||
|
@ -34,8 +34,8 @@
|
||||
cudaPackages,
|
||||
}:
|
||||
|
||||
assert gpuSupport -> cudaSupport != true;
|
||||
assert cudaSupport -> gpuSupport != true;
|
||||
assert gpuSupport -> !cudaSupport;
|
||||
assert cudaSupport -> !gpuSupport;
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "lightgbm";
|
||||
|
@ -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
|
||||
|
@ -8,7 +8,7 @@
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
assert guiSupport -> enableMinimal == false;
|
||||
assert guiSupport -> !enableMinimal;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnupg";
|
||||
|
@ -9,7 +9,7 @@
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
assert guiSupport -> enableMinimal == false;
|
||||
assert guiSupport -> !enableMinimal;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnupg";
|
||||
|
Loading…
Reference in New Issue
Block a user