automatically add cargo-insta if used
Some checks failed
CI / checks (push) Has been cancelled

This commit is contained in:
Robin Appelman 2025-02-28 23:49:44 +01:00
commit 591ea924cf
2 changed files with 7 additions and 1 deletions

View file

@ -10,7 +10,7 @@
...
}: let
inherit (builtins) elem readFile pathExists match any;
inherit (lib) getExe map mkDefault mkIf mkMerge mkOption warnIf optionalAttrs types optionalString genAttrs hasInfix;
inherit (lib) getExe map mkDefault mkIf mkMerge mkOption warnIf optionalAttrs types optionalString genAttrs hasInfix optionals;
inherit (lib.fileset) fileFilter toSource unions;
inherit (flakelight.types) fileset function optFunctionTo;
@ -39,6 +39,7 @@
LD_LIBRARY_PATH = "/run/opengl-driver/lib/:${lib.makeLibraryPath runtimeInputs}";
};
};
autoTools = pkgs: optionals (elem "insta" cargoMeta.dev-dependencies) [pkgs.cargo-insta];
in
warnIf (! builtins ? readFileType) "Unsupported Nix version in use."
{
@ -367,6 +368,7 @@ in
with pkgs;
[rustToolchain]
++ (config.tools pkgs)
++ (autoTools pkgs)
++ (buildDeps pkgs).buildInputs
++ (buildDeps pkgs).nativeBuildInputs;
@ -385,6 +387,7 @@ in
with pkgs;
[miriRustToolchain]
++ (config.tools pkgs)
++ (autoTools pkgs)
++ (buildDeps pkgs).buildInputs
++ (buildDeps pkgs).nativeBuildInputs;
@ -397,6 +400,7 @@ in
with pkgs;
[msrvRustToolchain]
++ (config.tools pkgs)
++ (autoTools pkgs)
++ (buildDeps pkgs).buildInputs
++ (buildDeps pkgs).nativeBuildInputs;