Age | Commit message (Collapse) | Author |
|
With this, attribute sets with a `__functor` attribute can be applied
just like normal functions. This can be used to attach arbitrary
metadata to a function without callers needing to treat it specially.
|
|
|
|
|
|
|
|
Useful for importNative plugins
|
|
Clearing v.app.right was not enough, because the length field of a
list only takes 32 bits, so the most significant 32 bits of v.app.left
(a.k.a. v.thunk.env) would remain. This could cause Boehm GC to
interpret it as a valid pointer.
This change reduces maximum RSS for evaluating the ‘tested’ job in
nixos/release-small.nix from 1.33 GiB to 0.80 GiB, and runtime by
about 8%.
|
|
|
|
This gives a ~18% speedup in NixOS evaluation (after converting
most calls to hasAttr/getAttr to dynamic attrs).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
So you can now do things like:
$ nix-env -qa '.*zip.*'
$ nix-env -qa '.*(firefox|chromium).*'
|
|
|
|
|
|
|
|
|
|
Workaround for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41174. This caused
hydra-eval-jobs to ignore SIGINT.
|
|
Note that unlike ‘lib.deepSeq’ in Nixpkgs, this handles cycles.
|
|
|
|
|
|
So this no longer crashes with a stack overflow:
nix-instantiate -E --eval 'let as = { x = as; }; in as'
Instead it prints:
{ x = { x = <CYCLE>; }; }
|
|
|
|
It returns the size of value, including all other values and
environments reachable from it. It is intended for debugging memory
consumption issues.
|
|
|
|
|
|
|
|
This prevents a double allocation per attribute set.
|
|
http://hydra.nixos.org/build/14344391
|
|
|
|
|
|
|
|
Fixes #333.
|
|
This was triggered by 47e185847e729d49e6aa376e8299fd66ef834a0a, which
turned globals.state into a pointer.
|
|
|
|
|
|
|
|
|
|
The name ‘nixPath’ breaks existing code.
|
|
|
|
src/libexpr/primops.cc:42:8: error: looser throw specifier for 'virtual nix::InvalidPathError::~InvalidPathError()'
src/libexpr/nixexpr.hh:12:1: error: overriding 'virtual nix::EvalError::~EvalError() noexcept (true)'
http://hydra.nixos.org/build/12385750
|
|
Fixes #294.
|
|
allow-arbitrary-code-during-evaluation option is true (default false)
|
|
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.
|
|
We're not catching these anywhere.
|
|
|
|
In addition to reducing duplication, this fixes both import from
derivation and import of derivation for scopedImport
|