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

Is it possible to use flake-compat without flakes enabled? #66

Open
jalaziz opened this issue May 20, 2024 · 2 comments
Open

Is it possible to use flake-compat without flakes enabled? #66

jalaziz opened this issue May 20, 2024 · 2 comments

Comments

@jalaziz
Copy link

jalaziz commented May 20, 2024

My understanding was that flake-compat could be used to enable the use of flakes with stable Nix. However, when I run nix-shell for my devShell based project, I receive:

error: experimental Nix feature 'flakes' is disabled; add '--extra-experimental-features flakes' to enable it

Am I misunderstanding the purpose of flake-compat?

@justinas
Copy link

The purpose is to allow you to import a flake into a non-flake Nix project.

for my devShell based project,

If you're making your own flake.nix, and using flake-enabled commands such as nix shell (you mentioned nix-shell, but I'm not sure if you meant to?), you still need to enable the flakes experimental feature.

@edolstra
Copy link
Owner

The purpose is to allow you to import a flake into a non-flake Nix project.

That's right. It shouldn't be necessary to enable the flakes experimental feature.

The purpose is to allow you to import a flake into a non-flake Nix project.

No, that's what builtins.getFlake is for.

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

3 participants