Skip to content

Add shell.nix to flake template#230

Merged
zimbatm merged 2 commits intonumtide:mainfrom
rummik:template-shell-nix
Sep 16, 2023
Merged

Add shell.nix to flake template#230
zimbatm merged 2 commits intonumtide:mainfrom
rummik:template-shell-nix

Conversation

@rummik
Copy link
Copy Markdown
Contributor

@rummik rummik commented Oct 17, 2022

This allows nix-shell to be used from tools that have not yet been updated to support flakes (ex: https://github.com/arrterian/nix-env-selector)

Comment thread template/shell.nix Outdated
then "git+file"
else "path";
in
(builtins.getFlake "${scheme}://${toString ./.}")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if that would work. Does builtins.getFlake work if flakes are disabled?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a really good question. I'll have to check and get back to you on that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out builtins.getFlake does not exist if flakes are not enabled system-wide. I'll update the PR with edolstra/flake-compat

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works with vanilla nix-shell as well now

@rummik rummik requested a review from zimbatm October 18, 2022 21:38
@brianmcgee
Copy link
Copy Markdown
Member

brianmcgee commented Mar 2, 2023

@rummik can you update with latest main.
@zimbatm is this ready to be merged afterwards?

@zimbatm
Copy link
Copy Markdown
Member

zimbatm commented Mar 2, 2023

yeah, technically that would work

rummik added 2 commits March 21, 2023 00:18
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)
@rummik rummik force-pushed the template-shell-nix branch from f22327b to a0cac5b Compare March 21, 2023 04:18
@zimbatm zimbatm merged commit f26c2e0 into numtide:main Sep 16, 2023
@rummik rummik deleted the template-shell-nix branch September 16, 2023 13:57
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.

3 participants