nix-super/src/libexpr
Shea Levy 0bb8db257d Add exec primop behind allow-unsafe-native-code-during-evaluation.
Execute a given program with the (optional) given arguments as the
user running the evaluation, parsing stdout as an expression to be
evaluated.

There are many use cases for nix that would benefit from being able to
run arbitrary code during evaluation, including but not limited to:

* Automatic git fetching to get a sha256 from a git revision
* git rev-parse HEAD
* Automatic extraction of information from build specifications from
  other tools, particularly language-specific package managers like
  cabal or npm
* Secrets decryption (e.g. with nixops)
* Private repository fetching

Ideally, we would add this functionality in a more principled way to
nix, but in the mean time 'builtins.exec' can be used to get these
tasks done.

The primop is only available when the
'allow-unsafe-native-code-during-evaluation' nix option is true. That
flag also enables the 'importNative' primop, which is strictly more
powerful but less convenient (since it requires compiling a plugin
against the running version of nix).
2017-03-30 08:04:21 -04:00
..
primops builtins.fetchgit: Support paths 2017-03-02 11:46:28 +01:00
attr-path.cc Optimize small lists 2015-07-23 22:05:09 +02:00
attr-path.hh Work on Values instead of Exprs 2013-09-03 13:17:51 +00:00
attr-set.cc Optimize empty sets 2015-07-23 23:11:08 +02:00
attr-set.hh Bindings: Add a method for iterating in lexicographically sorted order 2017-01-26 20:40:33 +01:00
common-opts.cc Enable HTTP/2 support 2016-09-14 16:36:02 +02:00
common-opts.hh StoreAPI -> Store 2016-02-04 14:48:42 +01:00
eval-inline.hh isFunctor: Simplify 2015-10-08 13:22:11 +02:00
eval.cc Add support for passing structured data to builders 2017-01-26 20:40:33 +01:00
eval.hh Add support for passing structured data to builders 2017-01-26 20:40:33 +01:00
get-drvs.cc Bindings: Add a method for iterating in lexicographically sorted order 2017-01-26 20:40:33 +01:00
get-drvs.hh nix-env: respect meta.outputsToInstall 2016-02-23 14:19:14 +01:00
json-to-value.cc Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
json-to-value.hh Add builtin function ‘fromJSON’ 2014-07-04 13:34:15 +02:00
lexer.l Tweak error message 2016-12-06 17:18:40 +01:00
local.mk Make primop registration pluggable 2016-04-14 12:50:01 +02:00
names.cc replace own regex class with std::regex 2016-10-18 20:22:25 +02:00
names.hh replace own regex class with std::regex 2016-10-18 20:22:25 +02:00
nix-expr.pc.in Install some pkgconfig files 2014-09-18 12:00:40 +02:00
nixexpr.cc First hit at providing support for floats in the language. 2016-01-05 00:40:40 +01:00
nixexpr.hh Throw a specific error for incomplete parse errors. 2016-02-24 04:32:21 -06:00
parser.y printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
primops.cc Add exec primop behind allow-unsafe-native-code-during-evaluation. 2017-03-30 08:04:21 -04:00
primops.hh Make primop registration pluggable 2016-04-14 12:50:01 +02:00
symbol-table.hh Include config.h implicitly with '-include config.h' in CFLAGS 2017-02-08 21:51:02 +02:00
value-to-json.cc nix path-info: Add --json flag 2016-08-29 17:29:24 +02:00
value-to-json.hh nix path-info: Add --json flag 2016-08-29 17:29:24 +02:00
value-to-xml.cc First hit at providing support for floats in the language. 2016-01-05 00:40:40 +01:00
value-to-xml.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
value.hh use std::tuple for ValueMap allocator 2017-03-24 23:05:49 +01:00