Closure vs. derivation in the Nix package manager
medium.com
medium.com
Note that package A is also inside this transitive closure. You can also think of A's closure as the absolute minimum Linux userspace needed to run package A.
Okay, so you have such a list, but how do you take that list an turn it into an actually usable installation of package A? Build dependencies are a thing, as well as source locations, build steps, installation paths, etc. Derivations act as a kind of executable build recipe. If you feed derivation A to the Nix builder daemon, it will chug for a while and then spit out a usable package A, no need for you to worry about dependencies, since the derivation knows about them.