Is it possible to use flake-compat without flakes enabled?
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?
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.
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.
In principle. There was a regression in #67 due to an old Nix bug that seems to be fixed in 2.24 at least in which builtins.fetchTree is visible but throws if the flakes experimental feature is disabled. This repo needs to have clearer compatibility guarantees since it is broken on Lix and Nix 2.18 today.
We do have a fix in the pipeline in Lix for this, but this is broken in 2.18 today.
This is still an issue. Nix version 2.28.4, fresh install of NixOS. Enabling flakes on my install fixed it, but that is obviously not ideal.
I have absolutely no idea why this doesn't work for you. Does https://git.lix.systems/lix-project/flake-compat work for you?