RE: Cabal and installing packages.

On 03 December 2004 16:24, Keean Schupke wrote:
Cool, I should have paid more attention to the Cabal stuff... Next question is;
Is there planned to be a front-end for fetching packages, that would let you download and install a package (and all its dependancies) from the command line? All I could find were the ./setup <option> commands?
If you're on a system with a good package manager (i.e. *BSD, Debian, Gentoo) then the plan is that this is all handled by the system package manager. We don't want to duplicate that work, and we want to coexist with the system's package tools as much as possible. Cabal will make it easy to generate package skeletons for these systems. We don't have a good story for the rest yet - that includes systems that don't have a package manager, and when you want to install packages in your own filespace on a multi user machine. A tool to do what you describe would definitely help here. Cheers, Simon

Simon Marlow wrote:
If you're on a system with a good package manager (i.e. *BSD, Debian, Gentoo) then the plan is that this is all handled by the system package manager. We don't want to duplicate that work, and we want to coexist with the system's package tools as much as possible. Cabal will make it easy to generate package skeletons for these systems.
I find that even on package managed systems I use CPAN to install perl modules... I would have thought a nice central repository on haskell.org (with mirrors of course) where users can contibute their packages, that would be built into a Haskell package tool would be useful even for systems where there is package management. I find that debian/gentoo etc do not have all the packages available for say perl, and it is nice to have a consistant interface on any platform... I think the ability to do (something like) > cabal install <package-name> and have everything done automatically would be a real advantage for beginners, ie: - download mirror list from haskell.org - find closest mirror using DNS tld - download package - resolve dependancies (ie call "cabal install" for each required package not on the system) - configure package - compile package - install package (globally if root, locally if normal user) also the ability to do queries like: > cabal list-packages -- lists all packages available from central archive > cabal find someRandomFunction -- returns name of package which exports given function To do some of the cleverer queries would require a custom server (perhaps darcs can do some/all of this)... Keean.

Keean Schupke
I find that debian/gentoo etc do not have all the packages available for say perl, and it is nice to have a consistant interface on any platform...
In such cases I think it's better to provide a way to make native packages. E.g. if you want to install some obscure perl module under gentoo, you can just type in g-cpan.pl Some::Obscure::Module, and after a few minutes a bunch of proper native packages will have been installed. The best thing about g-cpan.pl is that it uses existing packages if possible. So if e.g. dev-perl/LibXML has been patched to work with gcc-3.4 and the package you want to install depends on LibXML, you couldn't install it using CPAN but you could using g-cpan.pl. Gabriel.

I think it can all be done from a client side program. As cabal provides dependencies, and compile/install scripts it can simply download from Hackage and call the scripts. It sounds like the client could be quite simple, using the HTTP client libraries, then a set of system calls to run the scripts... But I see what you are saying too, a program to convert a cabal-package into say an ebuild for gentoo. A small problem is gentoo's emerge does not pass parameters to the scripts, so you would have to have an ebuild for every haskell package. Keean. Gabriel Ebner wrote:
Keean Schupke
writes: I find that debian/gentoo etc do not have all the packages available for say perl, and it is nice to have a consistant interface on any platform...
In such cases I think it's better to provide a way to make native packages. E.g. if you want to install some obscure perl module under gentoo, you can just type in g-cpan.pl Some::Obscure::Module, and after a few minutes a bunch of proper native packages will have been installed.
The best thing about g-cpan.pl is that it uses existing packages if possible. So if e.g. dev-perl/LibXML has been patched to work with gcc-3.4 and the package you want to install depends on LibXML, you couldn't install it using CPAN but you could using g-cpan.pl.
Gabriel.
------------------------------------------------------------------------
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

Keean Schupke
But I see what you are saying too, a program to convert a cabal-package into say an ebuild for gentoo.
I was suggesting something _along the lines_ of g-cpan.pl (maybe g-cabal or cabal emerge or ...) that can transparently install cabal packages (if they are not already available over the usual transport channels) as native packages. Such a tool might be feasable for other package managers too, I just don't if there are any.
A small problem is gentoo's emerge does not pass parameters to the scripts, so you would have to have an ebuild for every haskell package.
g-cpan.pl just generates multiple ebuilds. g-cabal/cabal emerge/... could do the same. Gabriel.

But of course writing a generic Haskell installer (for Hackage/Cabal) may well turn out to be simpler - and would be more useful to more people, and has the advantage that only one set of installation instructions are required as well. If I were to write it I would do it as a pure Haskell thing, then it doesn't need to be ported to each different distribution. Of course people are free to write distro versions as well. I don't think there need only be one way of doing things... Regards, Keean Gabriel Ebner wrote:
g-cpan.pl just generates multiple ebuilds. g-cabal/cabal
emerge/... could do the same.

Keean Schupke
But of course writing a generic Haskell installer (for Hackage/Cabal) may well turn out to be simpler - and would be more useful to more people, and has the advantage that only one set of installation instructions are required as well.
I didn't object against having such a tool, -- it's needed for distributions without package managers (think LFS), Windows, ... -- I just mentioned that it might (and hopefully will) be possible to install _any_ of the cabal packages (even if they are not already packaged by the distro) as distro-native packages without having to resort to a generic tool. Aside from that, having a generic version that can (as Simon said) output package skeletons would help such a cabal emerge tool (and any other such tool, for that matter) too. Gabriel.

Keean Schupke wrote:
Simon Marlow wrote:
If you're on a system with a good package manager (i.e. *BSD, Debian, Gentoo) then the plan is that this is all handled by the system package manager. We don't want to duplicate that work, and we want to coexist with the system's package tools as much as possible. Cabal will make it easy to generate package skeletons for these systems.
Hi all, I just wanted to say that I do agree with Keean here: A *simple* install manager for Haskell modules with a central repository would be great! Having said that, there are strong reasons for not doing this. The most important one is that a good package manager is not trivial and there already exist good package manager for many systems. Still, for 90% of all potential Haskell libraries, we can get away with a fraction of the effort of building a real package manager. This can really work, as long as we stick with a *simple* solution that is clearly described and whose limits are well defined. If someone requests something beyond the limits, we redirect to the OS package manager. With a clear and simple design, an implementation should not require too much effort or resources. (Actually, as I said before, a clear design with well defined limits is probably essential or otherwise the implementor will never be done :-) Now, I do not propose to do this myself :-), but I surely think that if there is anyone interested on this list on doing this, it would make a great project. I really feel that a simple installation system for Haskell would help to move the language forward. All the best, Daan.
I find that even on package managed systems I use CPAN to install perl modules... I would have thought a nice central repository on haskell.org (with mirrors of course) where users can contibute their packages, that would be built into a Haskell package tool would be useful even for systems where there is package management.
I find that debian/gentoo etc do not have all the packages available for say perl, and it is nice to have a consistant interface on any platform...
I think the ability to do (something like)
cabal install <package-name>
and have everything done automatically would be a real advantage for beginners, ie:
- download mirror list from haskell.org - find closest mirror using DNS tld - download package - resolve dependancies (ie call "cabal install" for each required package not on the system) - configure package - compile package - install package (globally if root, locally if normal user)
also the ability to do queries like:
cabal list-packages -- lists all packages available from central archive
cabal find someRandomFunction -- returns name of package which exports given function
To do some of the cleverer queries would require a custom server (perhaps darcs can do some/all of this)...
Keean. _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
participants (4)
-
Daan Leijen
-
Gabriel Ebner
-
Keean Schupke
-
Simon Marlow