lix/tests/functional/repl_characterization/data
Rebecca Turner 727b43478c Add repl-overlays
Adds a `repl-overlays` option, which specifies files that can overlay
and modify the top-level bindings in `nix repl`. For example, with the
following contents in `~/.config/nix/repl.nix`:

    info: final: prev: let
      optionalAttrs = predicate: attrs:
        if predicate
        then attrs
        else {};
    in
      optionalAttrs (prev ? legacyPackages && prev.legacyPackages ? ${info.currentSystem})
      {
        pkgs = prev.legacyPackages.${info.currentSystem};
      }

We can run `nix repl` and use `pkgs` to refer to `legacyPackages.${currentSystem}`:

    $ nix repl --repl-overlays ~/.config/nix/repl.nix nixpkgs
    Lix 2.90.0
    Type :? for help.
    Loading installable 'flake:nixpkgs#'...
    Added 5 variables.
    Loading 'repl-overlays'...
    Added 6 variables.
    nix-repl> pkgs.bash
    «derivation /nix/store/g08b5vkwwh0j8ic9rkmd8mpj878rk62z-bash-5.2p26.drv»

Change-Id: Ic12e0f2f210b2f46e920c33088dfe1083f42391a
2024-04-08 17:11:47 -07:00
..
extra_data Add repl-overlays 2024-04-08 17:11:47 -07:00
basic.ast Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
basic.test Add pre-commit checks 2024-03-29 22:57:40 -07:00
basic_repl.test Implement a repl characterization test system 2024-03-15 12:31:16 -07:00
basic_tidied.ast Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
basic_tidied.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
no_nested_debuggers.nix Merge pull request #9920 from 9999years/forbid-nested-debuggers 2024-03-31 17:28:25 +00:00
no_nested_debuggers.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
regression_9917.nix Add regression tests for #9917, #9918 2024-03-15 12:31:16 -07:00
regression_9917.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
regression_9918.nix Add regression tests for #9917, #9918 2024-03-15 12:31:16 -07:00
regression_9918.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
regression_l145.nix libexpr: associate let exprs with the correct StaticEnv 2024-03-18 14:15:22 -07:00
regression_l145.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00
repl_overlays.nix Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_compose.nix Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_compose.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_destructure_without_dotdotdot_errors.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_destructure_without_formals_ok.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_overlays_error.test Add repl-overlays 2024-04-08 17:11:47 -07:00
repl_printing.test Merge pull request #10208 from 9999years/print-strings-directly 2024-04-07 19:10:43 -07:00
stack_vars.nix Test that :st does ... something 2024-03-15 12:31:16 -07:00
stack_vars.test Rewrite REPL test parser 2024-04-05 13:14:21 -07:00