From 4d4682c2b6b1697236662495166b457abfb523cf Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 22 Oct 2020 13:41:28 +0200 Subject: [PATCH] lib/options.nix: Use head instead of elemAt _ 0 --- lib/options.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/options.nix b/lib/options.nix index 5b7482c8093..9e0ea010bda 100644 --- a/lib/options.nix +++ b/lib/options.nix @@ -110,7 +110,7 @@ rec { # Return early if we only have one element # This also makes it work for functions, because the foldl' below would try # to compare the first element with itself, which is false for functions - else if length defs == 1 then (elemAt defs 0).value + else if length defs == 1 then (head defs).value else (foldl' (first: def: if def.value != first.value then throw "The option `${showOption loc}' has conflicting definition values:${showDefs [ first def ]}"