There are libraries such as gitrev, which allows to compile in git revision into executable file, but in case of using nix-build http://../master git meta data are missing in the source tree.
How to reference derivation revision in such situation to have it at least inside shellHook?