You can clone with
HTTPS or Subversion.
(Imported from Trac #925, reported by @snoyberg on 2012-03-07)
When testing out my recently released cabal nirvana, Greg Weber pointed out than when building a package that does not use all of the constraints in the Nirvana file, you get a message such as:
cabal: There is no available version of authenticate that satisfies ==220.127.116.11
I confirmed that this happens with command-line constraints as well. A simple test case is to go into a non-Yesod project and run:
cabal install --constraint "yesod >= 0.10"
Unfortunately, this prevents nirvana from being of any use at all, which was our best shot at avoiding dependency hell.
(Imported comment by @kosmikus on 2012-03-07)
I've changed your bug into an enhancement request. What you're describing is intended behaviour. A constraint passed on the command line acts the same as a constraint put in the build-depends of a package, i.e., it not only restricts the range of versions, but also causes the package to actually be installed.
The closest to what you want that currently exists is --preference, and it should actually be sufficient in most cases. A --preference constraint does not prevent excluded versions from selected at all, but it will first try all preferred versions.
I appreciate the attempt you make with cabal-nirvana, but I don't like that it works by actually changing the downloaded files. Cabal already supports a global preferences file that's downloaded from Hackage. It should probably support local files with preferences, too. That would be relatively easy to change.
So there are two possible enhancements in this issue:
as well as the surrounding thread are also somewhat related.
Also see #380.
(Imported comment by @kosmikus on 2012-03-08)
I may have misunderstood the intended meaning of the --constraint flag. Investigating.
(Imported comment by @kosmikus on 2012-03-09)
Ok. I think that I have indeed mistakenly assumed that the old behaviour of --constraint was intended when it was not. Sorry for that.
In the current development repository (and in the upcoming cabal-install-0.14), constraints behave as was the assumption in this bug report originally. Saying --constraint=... on the command line does not introduce a target, it merely constrains the package.
So I'll restore the original title and consider this bug as fixed.