[Haskell-cafe] Damnit, we need a CPAN.

Achim Schneider barsoap at web.de
Thu May 29 11:38:30 EDT 2008


No, wait, there's cabal-install. And it doesn't even depend on 20+
packages I'd have to install manually. My day, for now, is saved, at
least if portage installs it without hesitation.

Ah, there it is: 
>>> Compiling source
>>> in /var/tmp/portage/dev-haskell/cabal-darcs-0/work/cabal-darcs-0 ...
 * Bootstrapping Cabal...

<no location info>: can't find file: Setup.lhs
 *
 * ERROR: dev-haskell/cabal-darcs-0 failed.

Ok, let's try it the other way 'round...:
% wget \
http://hackage.haskell.org/packages/archive/cabal-install/0.4.0/cabal-install-0.4.0.tar.gz
% tar xvzf cabal-install-0.4.0.tar.gz
% cd cabal-install-0.4.0
% runhaskell Setup.lhs configure --prefix=/home/ksf/cabal-inst --user
Configuring cabal-install-0.4.0...
% runhaskell Setup.lhs install
Installing: /home/ksf/cabal-inst/bin
Setup.lhs: dist/build/cabal/cabal: copyFile: does not exist (No such
file or directory)
% runhaskell Setup.lhs build
Preprocessing executables for cabal-install-0.4.0...
Building cabal-install-0.4.0...
[...]
% runhaskell Setup.lhs install
Installing: /home/ksf/cabal-inst/bin
% cabal update
% cabal install phooey
[...]
 type 'make' to build wxhaskell.
 type 'make install' to install wxhaskell.
 type 'make help' to receive help on all other make targets

Configure Succeeded.

Indeed. It succeeded. Now what? Building and installing by hand, it
seems.

Building works, installing too, but registering fails: the Makefile
does not seem to like --user:

% runhaskell Setup.lhs register --user
-=-= Cabal executing: make register=-=-
cat config/wxcore.pkg | sed -e
"s|\${wxhlibdir}|/home/ksf/cabal-inst/lib|" | ghc-pkg update - Reading
package info from stdin ... done. WARNING: unversioned dependencies are
deprecated, and will NOT be accepted by GHC 6.10: base haskell98 Unable
to rename "/usr/lib64/ghc-6.8.2/package.conf" to
"/usr/lib64/ghc-6.8.2/package.conf.old" Saving old package config
file... ghc-pkg.bin: /usr/lib64/ghc-6.8.2/package.conf: renameFile:
permission denied (Permission denied)


Just a second... 
# emerge wxhaskell -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     UD] dev-lang/ghc-6.4.2 [6.8.2] USE="X%* doc opengl%*
-binary -ghcbootstrap -openal% -test%(-bash-completion%)" 0 kB [0=>1]
[ebuild  N    ] dev-haskell/wxhaskell-0.9.4  USE="doc" 0 kB


In other words: No way. The only program that touches anything in /usr/
is portage.

Well, at least ghc-pkg update works on a mangled wxcore.pkg.


Rationale: We need a CPAN, a cabal that is smart enough to know what to
to, even if building depends on make, grapefruit authors that commit
to hackage, a cabal-inst that can install from darcs (or at least from
a local directory), or maybe just a make-replacement for haskell, like
java has with ant (which is really cool if you successfully do not
notice the xml-syntax).

I would already shut up if there were an ebuild generator, but then I'm
not that egoistic ;)

Anyway, three hours after wanting to try it out, grapefruit is up and
running, and I did not even have to install its dependencies by hand. It
seems like grapefruit could benefit from nestable cabal packages,
though: It has one big script that installs many packages. You could
also call them dependencies.

I'm going to shut up now.

-- 
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
signature prohibited. 



More information about the Haskell-Cafe mailing list