From d55147f8c9c6889c2dcd758582ef3d3e3f2d3574 Mon Sep 17 00:00:00 2001 From: Emile Clark-Boman Date: Sun, 14 Dec 2025 14:36:09 +1000 Subject: [PATCH] use `with nib.types` --- nib/types/attrs.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nib/types/attrs.nix b/nib/types/attrs.nix index f924552..e6ad2c5 100644 --- a/nib/types/attrs.nix +++ b/nib/types/attrs.nix @@ -1,5 +1,6 @@ {nib, ...}: -with builtins; rec { +with builtins; +with nib.types; rec { nameValuePair = name: value: {inherit name value;}; identityAttrs = value: {${value} = value;}; @@ -94,7 +95,7 @@ with builtins; rec { # form: attrValueAt :: xs -> path -> value # given path as a list of strings, return that value of an # attribute set at that path - attrValueAt = nib.types.foldl (l: r: + attrValueAt = foldl (l: r: if l != null && hasAttr r l then l.${r} else null);