mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
lib: add xor
This gets clumsily reimplemented in various places, to no useful end.
This commit is contained in:
parent
d03a448222
commit
725bb4e48c
12 changed files with 49 additions and 38 deletions
|
@ -871,7 +871,6 @@ in {
|
|||
}
|
||||
{
|
||||
assertion = let
|
||||
xor = a: b: a && !b || b && !a;
|
||||
isEffectivelySystemUser = user.isSystemUser || (user.uid != null && user.uid < 1000);
|
||||
in xor isEffectivelySystemUser user.isNormalUser;
|
||||
message = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue