lix/src/nix-env
Shay Bergmann ba81e871b2
toJSON: report error position for fancier output
Given flake:

```nix
{ description = "nix json error provenance";
  inputs = {};
  outputs = { self }: {
    jsonFunction = _: "function";
    json = builtins.toJSON (_: "function");
  };
}

```
- Before:

```console
❯ nix eval --json .#jsonFunction
error: cannot convert a function to JSON
```

- After:

```console
❯ nix eval --json .#jsonFunction
error: cannot convert a function to JSON

       at /nix/store/b7imf1c2j4jnkg3ys7fsfbj02s5j0i4f-source/testflake/flake.nix:4:5:

            3|   outputs = { self }: {
            4|     jsonFunction = _: "function";
             |     ^
            5|     json = builtins.toJSON (_: "function");
```
2021-10-25 21:17:52 +00:00
..
buildenv.nix Move some corepkgs into the nix binary 2020-03-11 16:57:48 +01:00
nix-env.cc toJSON: report error position for fancier output 2021-10-25 21:17:52 +00:00
user-env.cc Tidy 2021-08-30 09:52:43 +02:00
user-env.hh Mis-read Eelko's request to not make this an option: now, let's not make 2015-05-20 17:29:52 +02:00