Could someone please help me re-write this flake? I’m getting this message
`Dependency of package ‘nix-shell’ uses a nested list in attribute ‘buildInputs’. This is deprecated as of Nixpkgs release 26.05, and support will be removed in a future nixpkgs release.`
This is the kind of flake I’m using.
{
description = "A basic flake with a shell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/25.11";
systems.url = "github:nix-systems/default";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
};
outputs =
{ nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
nativeBuildInputs = [ pkgs.bashInteractive ];
buildInputs = with pkgs; [
R
quarto
chromium
pandoc
texlive.combined.scheme-medium
rstudio
(with rPackages; [
quarto
tidyverse
])
];
};
}
);
}
I believe the error comes from the (with rPackages…) part. I thought I could do something like the following, but it doesn’t work, it doesn’t like the second with.
buildInputs = with pkgs; [
R
quarto
chromium
pandoc
texlive.combined.scheme-full
rstudio
] ++
with pkgs.rPackages; [
quarto
tidyverse
]
];
I tried wrapping the second section in parentheses, but then it complains about a missing ; Could someone help me please? (Also, any general comments on the flake structure are appreciated. I’ve been copying and pasting for years.)
Cheers