about summary refs log tree commit diff
path: root/users/sterni/nix/misc/default.nix
blob: 1de9c973ec84231e43fd0549790c164deb14e5c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ ... }:

let
  /* Returns true if it is being evaluated using restrict-eval, false if not.
     It's more robust than using `builtins.getEnv` since it isn't fooled by
     `env -i`.

     See https://github.com/NixOS/nix/issues/6579 for a description of the
     behavior. Precise cause in the evaluator / store implementation is unclear.

     Type: bool
  */
  inRestrictedEval = builtins.pathExists (toString ./guinea-pig + "/.");
in

{
  inherit inRestrictedEval;
}