[Nix-dev] Howto resolving dependencies automatically but much faster ?

Tony White tonywhite100 at googlemail.com
Mon Dec 14 07:01:32 CET 2009


2009/12/14 Marc Weber <marco-oweber at gmx.de>:
> Hi.
>
> I posted earlier about hack-nix.
> It's an attempt to read package description from hackage then resolving
> dependencies automatically and finally creating nix derivations on the
> fly. It works reasonable fast unless you allow many different versions.
>
> Them memory consumption raises > 4GB and .. all you can do is hitting
> ctrl-c.
>
> Maybe there are many optimisations which can be applied.
> However I feel that nix is the wrong language to write such a tool.
>
> So how do you think about extending nix so that you can use arbitrary
> languages to implement builtin functions?
>
> Adding haskell specific code to nix itself is not the way to go, is it?
>
> So do you think we can extend nix so that it loads additional plugins
> (.so files) which provide these features?
>
> Or how would you try to enhance speed for specific tasks ?
>
> Probably I don't have time to implement it but I'd like to know how you
> think about it.
>
> Marc Weber
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>

Hi Marc,
Maybe you want to create a binary depsolver that can be used in a
builder script instead or is there too much going on?
I guess extending nix using any language like perl, ruby, php, python,
etc should be trivial if nix has hooks.
Maybe nix would benefit from a helper framework to tell other things
what it's doing or to ask it to do things? Stuff like : Don't start
this silly two hour build transaction, if I'm running my machine on
batteries, kind of thing. Or run nix with lower priority if I switch
to watching a game or playing a video, etc.
So like, calculate this really hard cabal-install transaction, then
create the expression file for it and tell nix to package it sort of
thing?
Sort of like a nix policy kit that sits there with the nix daemon and
lets programs use nix without actually going straight to nix.

If your memory usage for your hack-nix is getting too high with big
transactions, is it spawning too fast? Is there no way you can put a
break on it by doing a simple updated count before and after you do a
transaction into a global variable, set a limit and tell each
transaction in the loop to wait until the number of transactions has
decreased to a number below the set maximum limit?

Thanks,
Tony



More information about the nix-dev mailing list