Open
Description
What problem are you trying to solve?
There are certain nixpkgs
that require configuration using withExtensions
and withPackages
. Currently, the only way to utilize those packages in that way using DevBox is to create a flake, which feels antithetical to DevBox's proposition of abstracting Nix.
Example, for using the azure-cli
with azure-cli-extensions
:
{
description = "A flake to install azure-cli";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in {
formatter = pkgs.nixfmt;
packages = {
default = pkgs.azure-cli.withExtensions
[ pkgs.azure-cli-extensions.terraform ];
};
});
}
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.6/.schema/devbox.schema.json",
"packages": {
"path:./.flakes/azure-cli": "",
}
}
What solution would you like?
Allow for withExtensions
and withPackages
, possibly also override
, to be definable in devbox.json
:
{
"$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.13.6/.schema/devbox.schema.json",
"packages": {
"azure-cli": {
"version": "latest",
"withExtensions": {
"azure-cli-extensions.terraform": "latest"
}
}
}
}
Additionally, also including cli functionality to be able to add these to devbox.json
, ex: devbox add azure-cli --with-extensions azure-cli-extensions.terraform
.
Alternatives you've considered
No response