[Nix-dev] Announcing nix-exec

Shea Levy shea at shealevy.com
Mon Sep 29 13:58:05 CEST 2014


Hi Wout,

On Mon, Sep 29, 2014 at 11:28:02AM +0200, Wout Mertens wrote:
> Hi Shea,
> 
> so this allows you to interact with Nix in C++, wrapped as a Nix expression?
> 

Yes, exactly

> 
> I'm just trying to wrap my head around this, what would be the general
> approach to using this in e.g. Hydra?
> 

So, please bear in mind that I've not actually attempted this so it may
end up being a bad idea, but basically I imagine we'd have individual
fetch functions for each of the input types, a function to build a bunch
of derivations while allowing for failure and processing the output,
etc. all configured and invoked in a nix script. Currently we're
marshalling nix values as strings back and forth and have a custom C++
program to run the evaluation loop.

Note that in particular this would let each fetching function be defined
in a separate project no problem.

> 
> Thanks,
> 
> Wout.
> 
> 
> On Sun, Sep 28, 2014 at 9:28 PM, Shea Levy <shea at shealevy.com> wrote:
> 
> > Hi all,
> >
> > I've just added [1] nix-exec to nixpkgs. It provides a way to define and
> > execute programs written in nix, for programs that need to interact with
> > the nix store or expression language. Please see the home page [2] for
> > more details.
> >
> > Please note that this was a quick project, and that there are sure to be
> > bugs, inefficiencies, and lackluster documentation. I've only had time
> > so far to test one trivial example! So please open issues if something
> > isn't working right.
> >
> > Happy hacking!
> >
> > ~Shea
> >
> > [1]:
> > https://github.com/NixOS/nixpkgs/commit/d34cd13a317dd0df5af9f3a67ad22e9ea8f9e505
> > [2]: https://github.com/shlevy/nix-exec
> > _______________________________________________
> > nix-dev mailing list
> > nix-dev at lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> >


More information about the nix-dev mailing list