More than just your dependencies. I've unfortunately seen multiple systems where you basically would need a snapshot of the system it was last successfully built on to build it again. Ideally, that would be less common these days (people using modern CI really helps), but in practice I fear more systems are being built that way than ever before.
Most languages do this pretty well. ruby and rust package managers store all past versions of packages so its trivial to get the same setup again. Its C where the problems come from. Finding the right packages to build something is quite a task since every distro calls them different things and has different versions and only keeps 1 version at a time.
To be fair you could track down the git repositories or tarballs and compile and install the right versions. If the author used autotools as is standard, the version number should be listed.
It's not ideal of course. I wish it were standard to build all dependencies from source and statically link a big binary like Go does.