Add shell.nix to flake template#230
Merged
zimbatm merged 2 commits intonumtide:mainfrom Sep 16, 2023
Merged
Conversation
zimbatm
reviewed
Oct 17, 2022
| then "git+file" | ||
| else "path"; | ||
| in | ||
| (builtins.getFlake "${scheme}://${toString ./.}") |
Member
There was a problem hiding this comment.
I don't know if that would work. Does builtins.getFlake work if flakes are disabled?
Contributor
Author
There was a problem hiding this comment.
That's a really good question. I'll have to check and get back to you on that
Contributor
Author
There was a problem hiding this comment.
Turns out builtins.getFlake does not exist if flakes are not enabled system-wide. I'll update the PR with edolstra/flake-compat
Contributor
Author
There was a problem hiding this comment.
Works with vanilla nix-shell as well now
Member
Member
|
yeah, technically that would work |
This allows `nix-shell` to be used from tools that have not yet been updated to support `nix develop` (ex: https://github.com/arrterian/nix-env-selector)
f22327b to
a0cac5b
Compare
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.
This allows
nix-shellto be used from tools that have not yet been updated to support flakes (ex: https://github.com/arrterian/nix-env-selector)