Rust derivation fails to build with a weird permission denied error

I’m trying to write a derivation for a small rust project, but it fails with a weird error:

error: failed to get `hyprland` as a dependency of package `no_decoration_when_only v0.1.0 (/build/vzmwip52w32wzxx0kf0rlfid7i33ba9y-source)`

Caused by:
  failed to load source for dependency `hyprland`

Caused by:
  Unable to update https://github.com/hyprland-community/hyprland-rs.git?rev=5334cd237db771aad84a1bfdd3126487353d7528

Caused by:
  failed to create directory `/homeless-shelter/.cargo/git/db/hyprland-rs-ce7ad3b93f8820bb`

Caused by:
  Permission denied (os error 13)

I have also heard that I don’t actually need to set outputHashes for git dependencies, but if I don’t, it fails with an error saying that I do.

Here are the relevant parts:
https://github.com/diniamo/no_decorations_when_only/blob/1e6905a8fd5c07dda8e80684a4febb84d2bdcbde/Cargo.toml#L10
https://github.com/diniamo/no_decorations_when_only/blob/1e6905a8fd5c07dda8e80684a4febb84d2bdcbde/default.nix#L18-L20