From 3ca8b685c8d7896baf39e5a6bd1d75d22a915f47 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 22 Apr 2025 23:39:18 +0200 Subject: [PATCH] lib.getAttrFromPath: fix docs --- lib/attrsets.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/attrsets.nix b/lib/attrsets.nix index 8482887023f7..4518a94b6745 100644 --- a/lib/attrsets.nix +++ b/lib/attrsets.nix @@ -301,9 +301,9 @@ rec { Nix has an [attribute selection operator](https://nixos.org/manual/nix/stable/language/operators#attribute-selection) which is sufficient for such queries, as long as the number of attributes is static. For example: ```nix - x.a.b == getAttrByPath ["a" "b"] x + x.a.b == getAttrFromPath ["a" "b"] x # and - x.${f p}."example.com" == getAttrByPath [ (f p) "example.com" ] x + x.${f p}."example.com" == getAttrFromPath [ (f p) "example.com" ] x ``` # Inputs