**Describe the bug** When using a `source-repository-package` statement in a `cabal.project` file and using `--store-dir`: `cabal build` works but `cabal install` fails. cabal 3.2 and 3.4rc4 fail for different reasons. **To Reproduce** The following repository contains a minimal example of a failure: https://github.com/pjones/cabal-install-local-bug **Expected behavior** If the build succeeds then the install should too. **System information** - Linux - cabal 3.2 and 3.4rc4 - GHC 8.4.4 **Additional context** The repo mentioned above has two failing CI jobs, one for 3.2 and one for 3.4. - [3.2](https://github.com/pjones/cabal-install-local-bug/runs/1294427558?check_suite_focus=true) - [3.4rc4](https://github.com/pjones/cabal-install-local-bug/runs/1294427556?check_suite_focus=true)