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 --sandbox for debugging derivations #6493

Open
lf- opened this issue May 5, 2022 · 3 comments
Open

nix-shell --sandbox for debugging derivations #6493

lf- opened this issue May 5, 2022 · 3 comments

Comments

@lf-
Copy link
Member

lf- commented May 5, 2022

Is your feature request related to a problem? Please describe.

I was debugging a Haskell derivation yesterday and was stymied by /tmp/username/package.conf.d, which is assumed to be non-shared by the builder, but is not actually. It works fine in a sandboxed build.

Describe the solution you'd like

I would like to be able to create a nix-shell in the sandboxed build environment to debug derivations just as they would be built by the normal build flow. It would also be useful if I could write to $out in this environment, which is currently in the nix store and immutable.

Describe alternatives you've considered

Unsure if any exist.

Additional context

@lf- lf- added the improvement label May 5, 2022
@bjornfor
Copy link
Contributor

bjornfor commented May 5, 2022

Related: https://nixos.org/manual/nixpkgs/stable/#breakpointhook. (Have you seen it?)

@lf-
Copy link
Member Author

lf- commented May 6, 2022

Nope, have not seen that but it certainly looks very interesting. I don't think it's the right solution for every case though because it requires the build to be broken to be used.

@18fadly-anthony
Copy link

This seems similar to my issue, isolate home folder in nix-shell

@stale stale bot added the stale label Nov 12, 2022
@stale stale bot removed the stale label Dec 5, 2022
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

No branches or pull requests

4 participants