nix-shell: look up shell.nix when argument is a directory#11057
Merged
fricklerhandwerk merged 9 commits intoNixOS:masterfrom Jul 8, 2024
Merged
nix-shell: look up shell.nix when argument is a directory#11057fricklerhandwerk merged 9 commits intoNixOS:masterfrom
nix-shell: look up shell.nix when argument is a directory#11057fricklerhandwerk merged 9 commits intoNixOS:masterfrom
Conversation
afbe7c3 to
6959ac1
Compare
6959ac1 to
d5e16f6
Compare
d5e16f6 to
c4a20a4
Compare
fricklerhandwerk
approved these changes
Jul 7, 2024
Contributor
fricklerhandwerk
left a comment
There was a problem hiding this comment.
This is a great fix! I've ran into the problem a couple of times, it's one of the thousand paper cuts.
It is unclear to me why this worked when not in a VM test, but the explanation would be in the part of nix-shell we're getting rid of with the devShell attribute.
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
roberth
commented
Oct 31, 2024
| baseDir); | ||
| auto resolvedPath = resolveExprPath(sourcePath); | ||
| auto resolvedPath = | ||
| isNixShell ? resolveShellExprPath(sourcePath) : resolveExprPath(sourcePath); |
Member
Author
There was a problem hiding this comment.
Maybe the condition should be: isNixShell and no -A was passed?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Solve a long standing bug responsibly; see release note.
Users who have complicated
shell.nix/default.nixsetups can opt out by settingnix-shell-always-looks-for-shell-nixtofalse.If they do, they'll be warned when the new behavior would be triggered.
Context
nix-shell .behaves differently thannix-shell#496shell.nixfrom url #4529shell.nixfile #5431Priorities and Process
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.