[Haskell-cafe] non-hackage cabal repos? unpacking non-repo package
tarballs?
Claus Reinke
claus.reinke at talk21.com
Tue Nov 2 14:02:28 EDT 2010
I often find myself writing example code that I'd like
to distribute via cabal, but without further burdening
hackage with not generally useful packages.
1. The simplest approach would be if cabal could expose
its internal 'unpackPackage' as a command, so that
author: cabal sdist
user: cabal unpackPackage Example.tar.gz
would work (the point being that cabal handles .tar.gz,
which not all users have installed separately; distributing
the .tar.gz would be handled via the usual channels; and
after unpacking, cabal can build the source package).
Note that 'cabal unpack' does not seem helpful here,
as it touches the package index instead of just looking
at the tarball.
Could this be made possible, please? Or is it already?
2. Failing that, I remembered that cabal used to be designed
without a fixed package repo address, and a little digging
found options --remote-repo and --local-repo, as well as
the directory layout for package repositories:
http://hackage.haskell.org/trac/hackage/wiki/HackageDB
So this scenario seems possible, in principle:
author: expose a package repo http://myrepo
user: cabal --remote-repo=http://myrepo fetch Example
Is it possible to add a (temporary) repo location like this,
especially for 'cabal fetch'/'cabal unpack'? I've managed
to get 'cabal --local-repo=myrepo list Example' to work
(needs uncompressed 00-index.tar), but not the remote
variant, and fetching from the local repo doesn't work,
either.
Are there any usage examples of these features?
Claus
More information about the Haskell-Cafe
mailing list