Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nix
base: b9b8b8a63ba4
Choose a base ref
...
head repository: NixOS/nix
compare: d299bd710a5c
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 30, 2017

  1. 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).
    shlevy committed Mar 30, 2017
    4 Configuration menu
    Copy the full SHA
    0bb8db2 View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2017

  1. Merge branch 'builtins.exec'

    shlevy committed Mar 31, 2017
    Configuration menu
    Copy the full SHA
    d299bd7 View commit details
    Browse the repository at this point in the history