lix/src
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
..
build-remote Remove HintFmt::operator% 2024-03-26 15:40:05 -07:00
libcmd Add repl-overlays 2024-04-08 17:11:47 -07:00
libexpr Add repl-overlays 2024-04-08 17:11:47 -07:00
libfetchers meson: add missing explicit dependency on nlohmann_json 2024-03-29 14:16:58 -04:00
libmain meson: install pkg-config files for libraries 2024-03-29 02:45:48 +00:00
libstore Revert "libutil: remove Pool::Handle::bad" 2024-04-05 20:13:02 +00:00
libutil Add PathsSetting 2024-04-07 18:22:15 -07:00
nix meson: install libexec binaries 2024-03-30 14:34:22 +00:00
nix-build Move shell_words into its own file 2024-03-26 16:44:04 -07:00
nix-channel meson: implement functional tests 2024-03-27 18:37:50 -06:00
nix-collect-garbage util.hh: split out signals stuff 2024-03-11 00:52:09 -07:00
nix-copy-closure Merge pull request #9277 from keszybz/file-permissions 2024-03-04 05:26:17 +01:00
nix-env Delete hasPrefix and hasSuffix from the codebase 2024-03-17 20:17:19 -07:00
nix-instantiate Unify and refactor value printing 2024-03-09 03:50:06 +01:00
nix-store libexpr: Support structured error classes 2024-03-09 04:47:05 -07:00
resolve-system-dependencies libutil: make AutoCloseFD a better resource 2024-03-18 15:42:52 -06:00
meson.build meson: implement functional tests 2024-03-27 18:37:50 -06:00