
On 29/05/2009 11:23, Duncan Coutts wrote:
All,
This is a draft proposal for a common mechanism for implementing relative paths in installed package descriptions.
Comments and feedback are welcome. I'm cc'ing this to the cabal and ghc-users lists but let's keep the discussion on the libraries list.
There has been some discussion of this issue on the cabal and ghc-users list, but it's a relatively long thread and the idea has evolved somewhat so this is an attempt to present the proposal clearly.
Proposal ========
This proposal is an extension to the Cabal spec section 3 http://haskell.org/cabal/proposal/x272.html
Motivation ----------
Being able to have relative paths in the installed package description is useful as it makes it possible to construct relocatable (prefix-independent) package installations. This is useful when distributing compilers along with packages and there may be other uses.
This proposal does not require that all paths are relative. It is still perfectly ok to use absolute paths where appropriate. It just adds an option to use relative paths.
The aim is for a single simple specification that any compiler can implement and have the tools work uniformly, rather than ad-hoc implementations for each compiler.
Details -------
In the installed package description, we will allow paths that begin with the variables ${pkgroot} or ${pkgrooturl}. For example:
library-dirs: ${pkgroot}/foo-1.0 haddock-html: ${pkgrooturl}/doc/foo-1.0
Seems fine to me. So basically this just replaces GHC's undocumented $topdir feature? Cheers, Simon