maint: put cargo completions in the dev shell
This commit is contained in:
parent
61e66599f7
commit
117652a6a6
1 changed files with 8 additions and 0 deletions
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue