foo.nix -A attr --arg name value" will work if (name, value) is needed in the evaluation leading up to "attr".
and put it into a separate function findAlongAttrPath().