[Nix-dev] Would this be a way to solve the ghc-pkg install wrapper/libraries issue?

Marc Weber marco-oweber at gmx.de
Sun Aug 19 16:44:19 CEST 2007


The trouble occurs more than once

pkg1  \
pkg2  --  user profile / view of the store for the user
pkg3  /

That's what nix-env -i/ -e does at tho moment to not have to create one 
profile = derivation {
  ... }

However this problem does occur whenever there is a package where you
can install addons (such as plugins or libraries ..)
Examples are vim/ emacs and plugins, sound editors, ghc with
libraries..
(gcc with libraries.. though this problem is solved by creating /include
and /ib) ...

So I'd suggest using some kind of magic:

ghcWithLibraries = ( import .. ) {
  ghc = ghc61;
  name = "ghc-6.1 wrapper with user selected libraries"
  libraries = magicUserSelection "libraries to install with ghc 6.1"
     [ lib1 lib2 lib3 ... ]
{

profile = ( import .. ) {
  buildInputs = magicUserSelection "applications you want to install"
     [ flattenRec allPkgs ];
}

Now when using nix-env -i (perhaps a graphical ui later on) would see
some kind of tree:

applications you want to install
  * vim
  * wine
  * gtk
  * ...
  * ghc-6.1 wrapper with user selected libraries
    - libraries to install with ghc 6.1
        * HappY
        * hadock
        * mtl
        * ...

The selection could be written to database .. and you got it?
magicUserSelection can read the db and filter the list..

Thus would it make really easy to install these things,
I think it would also be a nix way ?

But because I don't have much knowledge about all the internals I'll
need some help to implement it or very much time..

Any feedback? (I don't get your idea is fine as well)

Thanks
Marc



More information about the nix-dev mailing list