Fix git artifact on NixOS

I’m using Documenter on NixOS. When I run julia --project make.jl, I get the following error:

┌ Warning: Unable to determine HTML(edit_link = ...) from remote HEAD branch, defaulting to "master".
│ Calling `git remote` failed with an exception. Set JULIA_DEBUG=Documenter to see the error.
│ Unless this is due to a configuration error, the relevant variable should be set explicitly.
└ @ Documenter ~/.julia/packages/Documenter/1HwWe/src/utilities/utilities.jl:712
│    IOError: could not spawn setenv(`/home/laikq/.julia/artifacts/8cb25db9a73519e871cc50d6915f8ab2770096f3/bin/git remote show origin`

Obviously, calling git fails. This comes as no surprise, since ldd ~/.julia/artifacts/8cb25db9a73519e871cc50d6915f8ab2770096f3/bin/git also shows: (0x00007ffcc6ff0000) => not found => not found => not found => /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/ (0x00007f76ae37f000) => /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/ (0x00007f76ae37a000) => /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib/ (0x00007f76ae192000)
	/lib64/ => /nix/store/ld03l52xq2ssn4x0g5asypsxqls40497-glibc-2.37-8/lib64/ (0x00007f76ae386000)

I’m not sure what’s the best way to proceed to get Documenter to use git normally. I know that I can also disable git, but this doesn’t work (or I don’t know how to make it work) for the function doctest. Maybe nix-alien or nix-ld are part of the solution, or artifact overrides.

An ad-hoc solution is adding this to Overrides.toml:

Git = "/run/current-system/sw"

where the UUID is of Git_jll.

Hm. It would be nice to have a per-project Overrides.toml such that I can use a version of git as specified in flake.lock.