Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable repl-flake experimental feature #640

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Enable repl-flake experimental feature #640

merged 2 commits into from
Sep 22, 2023

Conversation

Hoverbear
Copy link
Contributor

@Hoverbear Hoverbear commented Sep 22, 2023

Description

The repl-flake feature is really handy for folks adopting Nix with flakes.

Nix already warns about needing to use -f or --file in the future for the 'old' behavior:

❯ nix repl flake.nix
warning: future versions of Nix will require using `--file` to load a file

This makes stuff like the following work:

❯ nix repl .#
Welcome to Nix 2.17.0. Type :? for help.

Loading installable 'git+file:///home/ana/git/determinatesystems/nix-installer#'...
Added 5 variables.
nix-repl> packages
{ aarch64-darwin = { ... }; aarch64-linux = { ... }; i686-linux = { ... }; x86_64-darwin = { ... }; x86_64-linux = { ... }; }

And:

❯ nix repl "github:nixos/nixpkgs?dir=lib"
Welcome to Nix 2.17.0. Type :? for help.

Loading installable 'github:nixos/nixpkgs?dir=lib#'...
Added 1 variables.
nix-repl> lib.
lib.__unfix__                      lib.debug                          lib.genList                        lib.isType                         lib.mesonEnable                    lib.pathIsDirectory                lib.testAllTrue
lib.add                            lib.deepSeq
# ...
Checklist
  • Formatted with cargo fmt
  • Built with nix build
  • Ran flake checks with nix flake check
  • Added or updated relevant tests (leave unchecked if not applicable)
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • Linked to related issues (leave unchecked if not applicable)
Validating with install.determinate.systems

If a maintainer has added the upload to s3 label to this PR, it will become available for installation via install.determinate.systems:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/$PR_NUMBER | sh -s -- install

@Hoverbear Hoverbear added this to the 0.12.0 milestone Sep 22, 2023
@Hoverbear Hoverbear self-assigned this Sep 22, 2023
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noice

@Hoverbear Hoverbear merged commit 6bee48c into main Sep 22, 2023
13 checks passed
@Hoverbear Hoverbear deleted the enable-repl-flake branch September 22, 2023 19:06
@Hoverbear Hoverbear mentioned this pull request Sep 28, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants