[Nix-dev] Howto resolving dependencies automatically but much faster ?
Nicolas Pierron
nicolas.b.pierron at gmail.com
Tue Dec 15 10:09:20 CET 2009
On Tue, Dec 15, 2009 at 01:49, Tony White <tonywhite100 at googlemail.com> wrote:
>
> Hi Nicolas,
> I think that you're wrong about the helper function or maybe you
> didn't understand because I didn't explain it right?
Indeed, I did get it. I was focus on the problem raised by Marc which
is how to make Nix interacting with other languages.
> User : I want to update automatically, so let's turn on this
> (Non-existent in nix yet) Automatic update daemon that uses nix to
> update nixos.
>
> Automatic update daemon : Hmm, libtool is new, let's update it. Tell
> nix to run the transaction.
This is a good idea. Many softwares are going to this schema to
ensure that you have the latest stable versions. This can be
advantageous for user & for system profiles.
> nix : OK. I'm going to install libtool, I've just worked out all the
> dependencies and the stuff I need to compile for you. Let's do it!
>
> Helper function daemon : (Listening to nix say let's do it!) Nix stop.
> Hmm, before you do, let's make sure that there is nothing happening to
> effect conditions. Let's check the rules I have here.
> Hmm, don't run nix if the battery is the primary power source. Check.
> Are we running on batteries? Answer : yes!
> Helper function daemon tells nix not to continue and provides an error code.
> Helper function daemon then tells the automatic update daemon that it
> wasn't allowed to do what it wanted, should stash the transaction that
> failed and try to re-run it when an OK signal is received from the
> helper function daemon.
> Helper function daemon sends an OK signal to the automatic update
> daemon when mains power has been connected.
>
> I hope that's a good example of what I mean. Just simple calls to
> follow rule sets.
> You certainly wouldn't want nix to workout if the battery was running or not.
> Nix would just need a conditional if statement to interact with the
> helper function daemon. Otherwise nix can just do as it pleases, just
> as normal.
>
> It's a similar idea to packagekit but far, far greater because nix is
> more powerful than deb, rpm, etc. And yes, it is a wild look into the
> potential future, involving lots of work.
>
> Stuff like: nano : comand not found. Would you like to install nano?
> Would potentially be possible in a console (Install if not installed
> but requested.)
> Or wireless network detected, let's have the helper daemon ask the
> questions to help configure it using configuration.nix.
>
> Thanks,
> Tony
>
--
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/
The Hitchhiker's Guide to the Galaxy - What do you get if you multiply
six by nine?
More information about the nix-dev
mailing list