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

nix-shell --add-root 'urecognised flag' - deliberate or a new bug? #9300

Open
mpilgrem opened this issue Nov 5, 2023 · 0 comments
Open

nix-shell --add-root 'urecognised flag' - deliberate or a new bug? #9300

mpilgrem opened this issue Nov 5, 2023 · 0 comments
Labels

Comments

@mpilgrem
Copy link

mpilgrem commented Nov 5, 2023

Motivation: commercialhaskell/stack#6329

Stack makes use of the (undocumented: #1908) nix-shell --add-root. Recently, it reports error: unrecognised flag '--add-root'. Is that deliberate, or a new bug? If deliberate, is there an alternative to the original nix-shell --add-root functionality? I have not identified any documentation for the deliberate removal of nix-shell use of --add-root.

The stable manual for nix-shell states:

All options not listed here are passed to nix-store --realise, ...

The stable manual for nix-store --add continues to document the existence of a --add-root flag used with --realise.

For context, Stack's use of --add-root is documented as (via Stack's add-gc-roots option):

  # false by default. Whether to add your Nix dependencies as Nix garbage
  # collection roots. This way, calling nix-collect-garbage will not remove
  # those packages from the Nix store, saving you some time when running
  # stack build again with Nix support activated.
  #
  # This creates a `nix-gc-symlinks` directory in the project `.stack-work`.
  # To revert that, just delete this `nix-gc-symlinks` directory.
  add-gc-roots: false
@mpilgrem mpilgrem added the bug label Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant