Use the following in the nativeBuildInputs
:
writeShellScriptBin "git" ''
echo "${theInput.rev}"
''
Extend the script as necessary for more complex “git queries”.
Alternatively patch the build process of the project to not rely on git at all for the version, but instead replace the git run with a hardcoded value based on your version
field.