What do you mean? Just use a git repository as a source, but you may as well create a hashed folder containing your source files, but that is not the primary function of nix.
I mean so I can reproduce it in 10+ years where many git repos don’t exist anymore. Go can keep checksumed copies of any code it uses to compile. I’d like to see this in Nix as well.