1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-01-22 14:45:27 +00:00
nixpkgs/lib
Robert Hensing 9c0ab2f26d lib/modules.nix: Add file context to unmerged values in mergeDefinitions
This helps with troubleshooting exceptions in config values, which were hard
to track down for options with many definitions.
The trace will look like:

    error: while evaluating the attribute 'config.foo' at undefined position:
    [...]
    while evaluating the option `foo':
    [...]
    while evaluating definitions from `/home/user/mymod.nix':
    while evaluating 'dischargeProperties' at /home/user/nixpkgs/lib/modules.nix:464:25, called from /home/user/nixpkgs/lib/modules.nix:392:137:
    while evaluating the attribute 'value' at /home/user/nixpkgs/lib/modules.nix:277:44:
    Value error!

where the `/home/user/mymod.nix` module is

    { lib, ... }: {
      options.foo = lib.mkOption {
        type = lib.types.lines;
      };
      config.foo = builtins.throw "Value error!";
    }
2020-02-24 00:15:36 +01:00
..
systems Merge pull request #80814 from matthewbauer/default-newlib-for-none 2020-02-22 15:36:03 -05:00
tests lib/tests/misc.nix: Don't make a copy on Nixpkgs 2020-02-10 16:21:04 +01:00
asserts.nix lib: move assertMsg and assertOneOf to their own library file 2018-09-06 18:14:27 +02:00
attrsets.nix lib/attrsets: Fix error in comment for getAttrFromPath 2020-01-20 22:42:38 +01:00
cli.nix lib/cli: mkKey -> mkOptionName, use generators.mkValueStringDefault 2020-01-23 14:47:38 +01:00
customisation.nix Merge pull request #67809 from Infinisil/propagate-override-args 2019-10-22 14:37:40 +02:00
debug.nix lib/debug: Update documentation comments for docs generation 2018-10-29 10:45:25 +01:00
default.nix Merge pull request #78337 from Profpatsch/lib-improve-cli-module 2020-01-24 21:05:53 +01:00
deprecated.nix treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
fetchers.nix Convert libs to a fixed-point 2017-09-16 21:36:43 -04:00
filesystem.nix Convert libs to a fixed-point 2017-09-16 21:36:43 -04:00
fixed-points.nix lib.converge: optimise 2019-04-17 15:55:57 +01:00
generators.nix lib/generators: floats are not supported in mkValueStringDefault 2020-01-23 14:47:38 +01:00
kernel.nix treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
licenses.nix Notion custom license: exclude 2020-01-17 08:31:22 -03:00
lists.nix Merge master into staging-next 2019-09-06 22:46:05 +02:00
meta.nix lib: implement setPrio 2018-11-22 08:59:48 +00:00
minver.nix Nix minimal version: 1.11 -> 2.0 2018-08-30 08:09:54 -04:00
modules.nix lib/modules.nix: Add file context to unmerged values in mergeDefinitions 2020-02-24 00:15:36 +01:00
options.nix lib/options: fix path in comment 2019-08-26 02:01:49 +02:00
sources.nix nixos/version: fix case where .git is a symlink 2020-01-20 00:53:44 +01:00
strings-with-deps.nix Convert libs to a fixed-point 2017-09-16 21:36:43 -04:00
strings.nix Revert "Revert "Merge master into staging-next"" 2020-02-05 19:41:25 +01:00
trivial.nix 20.09 is Nightingale 2020-02-10 14:14:18 -05:00
types.nix Replace short URL from #63103 with full URL. 2020-01-15 13:47:49 +00:00
versions.nix lib/versions: expose splitVersion 2019-09-26 17:42:42 +02:00
zip-int-bits.nix lib/trivial: move zipIntBits to its own file 2018-07-26 20:36:45 +02:00