1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/lib
Silvan Mosberger 1c00bf3948 lib/customization: Improve callPackage error message for missing args
This uses the levenshtein distance to look through all possible
arguments to find ones that are close to what was requested:

  error: Function in /home/infinisil/src/nixpkgs/pkgs/tools/text/ripgrep/default.nix
    called without required argument "fetchFromGithub",
    did you mean "fetchFromGitHub" or "fetchFromGitLab"?

With https://github.com/NixOS/nix/pull/3468 (in current nixUnstable) the error
message becomes even better, adding line location info
2022-04-01 22:03:05 +02:00
..
systems
tests lib/tests: Add tests for levenshtein functions 2022-04-01 22:03:05 +02:00
asserts.nix
attrsets.nix Merge pull request #147077 from Infinisil/updateAttrPaths 2022-03-19 19:00:03 +01:00
cli.nix
customisation.nix lib/customization: Improve callPackage error message for missing args 2022-04-01 22:03:05 +02:00
debug.nix
default.nix lib/trivial: actually expose warnIfNot and throwIf 2022-03-27 16:48:33 +02:00
deprecated.nix
fetchers.nix
filesystem.nix
fixed-points.nix
flake.nix
generators.nix
kernel.nix
licenses.nix Merge pull request #165672 from yoctocell/patatt-init 2022-03-27 14:53:39 +02:00
lists.nix
meta.nix
minver.nix
modules.nix Merge pull request #164651 from Infinisil/remove-optionSet 2022-03-25 17:41:57 +01:00
options.nix Merge remote-tracking branch 'origin/master' into haskell-updates 2022-03-26 09:59:28 +01:00
sources.nix
strings-with-deps.nix
strings.nix lib/strings: Add levenshtein distance functions 2022-04-01 22:03:05 +02:00
trivial.nix Merge pull request #164660 from ncfavier/tests-restrict-arguments 2022-03-24 17:01:47 +01:00
types.nix lib/modules: Finally remove deprecated types.optionSet 2022-03-18 04:51:27 +01:00
versions.nix
zip-int-bits.nix