Load TOML shells with numtide/devshell #78
+290
−18
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 changeset loads TOML devshells using
numtide/blueprint
.The only requirement is that the user's flake has an
input.devshell
otherwise they will be told to add it.I still have to add documentation for this feature.
Basically, if you have any
/devshells/*.toml
or/devshell.toml
they will be loaded with something likedevshell.fromTOML
but that allows custom nix modules to also access packages fromperSystem.self
.I'm using this branch at my local nixos setup, see https://github.com/vic/vix/tree/main/devshells for some devshells I've defined, particularly
nixos.toml
that importsnixos/leader.nix
which can access packages defined in the flake itself.The old behaviour is still preserved, and any
.nix
files will still be loaded as-is. So those nix files are responsible for using either nixpkgs's mkShell or devshell's one. For example, myscala3.nix
customizes the JRE for some tools.I'll be adding documentation tomorrow, and would love if you could direct me on how to write tests for this functionality.
Cheers :)