From 511bf56650e7a29dde9e48ee1e06ec3250df140c Mon Sep 17 00:00:00 2001 From: Justin ! Date: Wed, 31 Dec 2025 14:36:40 -0500 Subject: [PATCH] treewide: fix or-as-identifier Lix will soon warn, and in the future, error when `or` is used as an identifier. This commit fix those cases. --- lib/default.nix | 2 +- lib/options.nix | 2 +- lib/trivial.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 7dfa9354fa7f..661f76bed0ef 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -110,7 +110,7 @@ let const pipe concat - or + "or" and xor bitAnd diff --git a/lib/options.nix b/lib/options.nix index a36fc2220d21..1cf93d5bdf92 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -433,7 +433,7 @@ rec { else if all isAttrs list then foldl' lib.mergeAttrs { } list else if all isBool list then - foldl' lib.or false list + foldl' lib."or" false list else if all isString list then lib.concatStrings list else if all isInt list && all (x: x == head list) list then diff --git a/lib/trivial.nix b/lib/trivial.nix index 5e527a1614e2..be67e0f3d539 100644 --- a/lib/trivial.nix +++ b/lib/trivial.nix @@ -197,7 +197,7 @@ in : 2\. Function argument */ - or = x: y: x || y; + "or" = x: y: x || y; /** boolean “and”