diff --git a/package.nix b/package.nix index 6b7cee9..8725d02 100644 --- a/package.nix +++ b/package.nix @@ -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";