v2-install on tarball URL fails to find executable in package
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
Running `cabal v2-install https://hackage.haskell.org/package/hlint-3.3/hlint-3.3.tar.gz` fails, while manually running `cabal v2-install` in the unpacked tarball works just fine. This does not appear to be specific to `hlint`.
**To Reproduce**
```
cabal v2-install https://hackage.haskell.org/package/hlint-3.3/hlint-3.3.tar.gz
```
yields
```
Downloading http://hackage.haskell.org/package/hlint-3.3/hlint-3.3.tar.gz
Resolving dependencies...
cabal: Cannot build all the executables in the project because none of the
packages contain any executables. Check the .cabal files for the packages and
make sure that they properly declare the components that you expect.
```
**Expected behavior**
Downloading and installing packages using tarball URLs should succeed.
**System information**
- Operating system: Ubuntu 20.04.2
- `cabal` 3.4.0.0
- `ghc` 8.8.4
**Additional context**
The installation appears to work if I manually grab the tarball instead.
```
wget https://hackage.haskell.org/package/hlint-3.3/hlint-3.3.tar.gz
tar -xzvf hlint-3.3.tar.gz
cd hlint-3.3
cabal v2-install
```
Running the troublesome command with `-v` shows that cabal seems to correctly resolve the dependencies.
Contributor guide
Assessment
This issue has not been assessed yet.