lix/src
Maximilian Bosch 2b02ce0e48
libexpr: throw a more helpful eval-error if a builtin is not available due to a missing feature-flag
I found it somewhat confusing to have an error like

    error: attribute 'getFlake' missing

if the required experimental-feature (`flakes`) is not enabled. Instead,
I'd expect Nix to throw an error just like it's the case when using e.g. `nix
flake` without `flakes` being enabled.

With this change, the error looks like this:

    $ nix-instantiate -E 'builtins.getFlake "nixpkgs"'
    error: Cannot call 'builtins.getFlake' because experimental Nix feature 'flakes' is disabled. You can enable it via '--extra-experimental-features flakes'.

           at «string»:1:1:

                1| builtins.getFlake "nixpkgs"
                 | ^

I didn't use `settings.requireExperimentalFeature` here on purpose
because this doesn't contain a position. Also, it doesn't seem as if we
need to catch the error and check for the missing feature here since
this already happens at evaluation time.
2021-09-29 11:57:15 +02:00
..
build-remote copyPaths: Pass store by reference 2021-07-22 09:59:51 +02:00
cpptoml Revert the enum struct change 2020-06-18 22:11:26 +00:00
libcmd Respect NO_COLOR in Markdown output 2021-09-14 14:57:58 +02:00
libexpr libexpr: throw a more helpful eval-error if a builtin is not available due to a missing feature-flag 2021-09-29 11:57:15 +02:00
libfetchers Explicitly set initial branch name for git 2021-09-24 22:09:49 +08:00
libmain Merge pull request #5224 from baloo/baloo/5089/force-nss_dns-load 2021-09-09 10:37:41 +02:00
libstore Merge pull request #5253 from edolstra/flake-ifd 2021-09-24 10:48:23 +02:00
libutil Make setDefault() typed 2021-09-22 14:15:35 +02:00
nix Disable IFD selectively 2021-09-22 17:15:07 +02:00
nix-build nix-shell --pure: Let it work for any derivation 2021-08-06 15:30:49 -07:00
nix-channel Initialize plugins after handling initial command line flags 2021-02-24 08:22:17 -05:00
nix-collect-garbage Initialize plugins after handling initial command line flags 2021-02-24 08:22:17 -05:00
nix-copy-closure copyPaths: Pass store by reference 2021-07-22 09:59:51 +02:00
nix-env Fix quotes 2021-09-14 19:48:16 +02:00
nix-instantiate nix-instantiate: Fix --eval-store 2021-07-27 11:16:47 +02:00
nix-store Rename Buildable 2021-04-05 09:52:25 -04:00
nlohmann nlohmann_json: Update to 3.9.1, fix use of internal copy 2021-07-15 12:25:53 +02:00
resolve-system-dependencies Apply OS checks to host platform, not build 2021-06-23 15:00:36 +00:00