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,
|
mkShell,
|
||||||
python3Packages,
|
python3Packages,
|
||||||
fenixToolchain,
|
fenixToolchain,
|
||||||
|
cargo,
|
||||||
}: let
|
}: let
|
||||||
mkShell' = mkShell.override { inherit stdenv; };
|
mkShell' = mkShell.override { inherit stdenv; };
|
||||||
pyEnv = python3Packages.python.withPackages (p: [ p.beartype ]);
|
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' {
|
in mkShell' {
|
||||||
name = "devshell-for-${self.name}";
|
name = "devshell-for-${self.name}";
|
||||||
inputsFrom = [ self ];
|
inputsFrom = [ self ];
|
||||||
|
|
@ -137,12 +142,15 @@ in {
|
||||||
pyEnv
|
pyEnv
|
||||||
stdenv.cc
|
stdenv.cc
|
||||||
fenixToolchain
|
fenixToolchain
|
||||||
|
cargoCompletions
|
||||||
];
|
];
|
||||||
env.PYTHONPATH = [
|
env.PYTHONPATH = [
|
||||||
"${pyEnv}/${pyEnv.sitePackages}"
|
"${pyEnv}/${pyEnv.sitePackages}"
|
||||||
# Cursed.
|
# Cursed.
|
||||||
"${path}/nixos/lib/test-driver/src"
|
"${path}/nixos/lib/test-driver/src"
|
||||||
] |> lib.concatStringsSep ":";
|
] |> lib.concatStringsSep ":";
|
||||||
|
|
||||||
|
passthru = { inherit cargoCompletions; };
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru.modulesPath = self.modules + "/share/nixos/modules";
|
passthru.modulesPath = self.modules + "/share/nixos/modules";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue