put flake input overrides into a helper function

This commit is contained in:
Jörg Thalheim
2025-07-07 17:12:53 +02:00
committed by Mic92
parent a635f9c6fe
commit 4f13049ee2
8 changed files with 23 additions and 18 deletions

16
lib/flake-inputs.nix Normal file
View File

@@ -0,0 +1,16 @@
{ ... }:
{
/**
Generate nix-unit input overrides for tests
# Example
```nix
inputOverrides = clanLib.flake-inputs.getOverrides inputs;
```
*/
getOverrides =
inputs:
builtins.concatStringsSep " " (
builtins.map (input: " --override-input ${input} ${inputs.${input}}") (builtins.attrNames inputs)
);
}