How do I add extra packages through extraPackages
?
#13
-
What am I doing wrong here? devShell.extraPackages = [
git
]; I get the following error:
I'm not sure where I should get the package definition from. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi there! There is no default source of packages that is automatically in scope, syntactically speaking, so you would need to provide that context in your own flake definition. This can be done via the surrounding syntax constructs, such as function arguments or a let-binding, for example. You can see more information about the available arguments that Adapting the example flake to your question here, you can use the outputs = inputs @ {
beam-flakes,
flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [beam-flakes.flakeModule];
systems = ["aarch64-darwin" "x86_64-darwin" "x86_64-linux"];
perSystem = { pkgs, ... }: {
beamWorkspace = {
enable = true;
# your other settings here ...
devShell.extraPackages = [ pkgs.git ];
};
};
}; |
Beta Was this translation helpful? Give feedback.
Hi there! There is no default source of packages that is automatically in scope, syntactically speaking, so you would need to provide that context in your own flake definition. This can be done via the surrounding syntax constructs, such as function arguments or a let-binding, for example.
You can see more information about the available arguments that
flake-parts
provides here. I could potentially be more explicit in the README about this, but some amount of practical familiarity withflake-parts
will be necessary to be successful with this library, and would potentially benefit your other Nix use anyway.Adapting the example flake to your question here, you can use the
flake-parts
perSy…