A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own
It is common for repositories which provide flakes to provide development shells under a top-level attribute flake#devShells, with flake#devShell being the default one (an alias for flake#devShells."<system>".default). These are accessed with the command nix develop flake#myShell; an excerpt from https://nixos.wiki/wiki/Flakes:
# Used by `nix develop .#<name>`
devShells."<system>"."<name>" = derivation;
# Used by `nix develop`
devShells."<system>".default = derivation;
However, you can't pass something like "flakeUri": "github:owner/repo#devShell" to the Nix feature provided here, because it (rightly) complains that this isn't a derivation (the correct derivation would be github:owner/repo#devShell.x86_64-linux). Fundamentally, this is because the implementation uses nix profile install, which searches for derivations under the flake#packages top-level attribute:
Ideally, somewhere in this feature a call should be made to nix develop to enable access to the development shells provided by a flake, rather than having to use the workaround of flake#devShell.x86_64-linux.
It is common for repositories which provide flakes to provide development shells under a top-level attribute
flake#devShells
, withflake#devShell
being the default one (an alias forflake#devShells."<system>".default
). These are accessed with the commandnix develop flake#myShell
; an excerpt from https://nixos.wiki/wiki/Flakes:However, you can't pass something like
"flakeUri": "github:owner/repo#devShell"
to the Nix feature provided here, because it (rightly) complains that this isn't a derivation (the correct derivation would begithub:owner/repo#devShell.x86_64-linux
). Fundamentally, this is because the implementation usesnix profile install
, which searches for derivations under theflake#packages
top-level attribute:https://github.com/devcontainers/features/blob/f7f05f76fabda70f4fbcaefd55e6fe6fd09a8145/src/nix/post-install-steps.sh#L11-L15
Ideally, somewhere in this feature a call should be made to
nix develop
to enable access to the development shells provided by a flake, rather than having to use the workaround offlake#devShell.x86_64-linux
.