lix/src
Shea Levy 5cd022d6c0 Add importNative primop
This can be used to import a dynamic shared object and return an
arbitrary value, including new primops. This can be used both to test
new primops without having to recompile nix every time, and to build
specialized primops that probably don't belong upstream (e.g. a function
that calls out to gpg to decrypt a nixops secret as-needed).

The imported function should initialize the Value & as needed. A single
import can define multiple values by creating an attrset or list, of
course.

An example initialization function might look like:

extern "C" void initialize(nix::EvalState & state, nix::Value & v)
{
    v.type = nix::tPrimOp;
    v.primOp = NEW nix::PrimOp(myFun, 1, state.symbols.create("myFun"));
}

Then `builtins.importNative ./example.so "initialize"` will evaluate to
the primop defined in the myFun function.
2014-06-17 12:08:01 -04:00
..
boost boost::shared_ptr -> std::shared_ptr 2014-03-30 00:49:23 +01:00
bsdiff-4.3 Fix "make dist" 2014-02-01 14:38:12 +01:00
download-via-ssh Simplify getting use-ssh-substituter from untrusted users 2014-02-26 13:58:46 +01:00
libexpr Add importNative primop 2014-06-17 12:08:01 -04:00
libmain Ugly hack to allow --argstr values starting with a dash 2014-05-23 14:43:58 +02:00
libstore Report daemon OOM better 2014-06-10 13:45:50 +02:00
libutil Don't use member initialisers 2014-06-12 17:30:37 +02:00
nix-daemon Report daemon OOM better 2014-06-10 13:45:50 +02:00
nix-env nix-env -qa --json: Generate valid JSON even if there are invalid meta attrs 2014-06-02 17:58:43 +02:00
nix-hash Remove Automakefiles 2014-02-01 13:54:38 +01:00
nix-instantiate Ensure that -I flags get included in nixPath 2014-05-26 16:52:31 +02:00
nix-log2xml Remove Automakefiles 2014-02-01 13:54:38 +01:00
nix-store nix-store -l: Fetch build logs from the Internet 2014-05-21 17:19:36 +02:00