nix-module-wrapper-manager-fds/tests/default.nix
Gabriel Arazas c2625afbff
Some checks failed
Check test suite / Check outputs (push) Has been cancelled
Deploy documentation site / Build website (push) Has been cancelled
Deploy documentation site / Deploy website (push) Has been cancelled
Update Nix dependencies / update-nix-deps (push) Has been cancelled
chore: reformat codebase
2025-01-12 17:58:39 +08:00

36 lines
830 B
Nix

let
sources = import ../npins;
in
{
pkgs ? import sources.nixos-unstable { },
}:
let
wrapperManagerLibTests = import ./lib { inherit pkgs; };
inherit (pkgs) lib;
in
{
configs =
let
configs' = import ./configs { inherit pkgs; };
updateTestName =
configName: package:
lib.mapAttrs' (n: v: lib.nameValuePair "${configName}-${n}" v) package.wrapperManagerTests;
in
lib.concatMapAttrs updateTestName configs';
lib =
pkgs.runCommand "wrapper-manager-fds-lib-test"
{
testData = builtins.toJSON wrapperManagerLibTests;
passAsFile = [ "testData" ];
nativeBuildInputs = with pkgs; [
yajsv
jq
];
}
''
yajsv -s "${./lib/tests.schema.json}" "$testDataPath" && touch $out || jq . "$testDataPath"
'';
}