maint: put cargo completions in the dev shell

This commit is contained in:
Qyriad 2026-03-10 19:56:41 +01:00
parent 61e66599f7
commit 117652a6a6

View file

@ -127,9 +127,14 @@ in {
mkShell,
python3Packages,
fenixToolchain,
cargo,
}: let
mkShell' = mkShell.override { inherit stdenv; };
pyEnv = python3Packages.python.withPackages (p: [ p.beartype ]);
# Fenix's Cargo doesn't have completions, but Nixpkgs' does.
cargoCompletions = linkFarm "cargo-bash-completions" {
"share/bash-completion" = cargo + "/share/bash-completion";
};
in mkShell' {
name = "devshell-for-${self.name}";
inputsFrom = [ self ];
@ -137,12 +142,15 @@ in {
pyEnv
stdenv.cc
fenixToolchain
cargoCompletions
];
env.PYTHONPATH = [
"${pyEnv}/${pyEnv.sitePackages}"
# Cursed.
"${path}/nixos/lib/test-driver/src"
] |> lib.concatStringsSep ":";
passthru = { inherit cargoCompletions; };
};
passthru.modulesPath = self.modules + "/share/nixos/modules";