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

Fix pypi2nix failing to spawn shell #20

Merged
merged 1 commit into from
Apr 7, 2020
Merged

Conversation

ysndr
Copy link
Contributor

@ysndr ysndr commented Mar 30, 2020

I made this change to get pypi2nix working as I experienced similar issues as in #15
The way I managed to work around this is to introduce a new env variable NIX_EXECUTING_SHELL which (as the name says) holds the shell executable from which nix-shell was executed. It is then used by the buildShellShim as the shell. to be spawned in case of interactive invocations.

The main problem with pypi2nix was that it executes nix-shell without zsh on PATH which made the shim fail to run, it also unsets $SHELL so now with NIX_EXECUTING_SHELL empty, nothing gets executed and for such situations a bash shell stays open as a. result.

Note: Although this is meant to fix an issue with pypi2nix I suspect this to also work on other projects which use nix-shell from a clean process.

Note: Although this is meant to fix an issue with pypi2nix I suspect this to also work on other projects which use nix-shell from a clean process.
@chisui chisui merged commit 78e169e into chisui:master Apr 7, 2020
@chisui
Copy link
Owner

chisui commented Apr 7, 2020

Thank you. You are right, this will make the plugin itself more reliable.

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