I forgot that Nix does not implement maximal laziness.
I assumed the function call would be memoized in here but it seems that is not the case.
If I understand correctly, the difference in here is that the result is stored as an attribute value therefore it will be evaluated once.