2024-07-01 14:27:03 +00:00
|
|
|
let
|
|
|
|
sources = import ../npins;
|
|
|
|
in
|
2024-07-31 13:51:40 +00:00
|
|
|
{
|
|
|
|
pkgs ? import sources.nixos-unstable { },
|
|
|
|
}:
|
2024-07-13 09:00:06 +00:00
|
|
|
|
|
|
|
let
|
2024-09-21 11:32:08 +00:00
|
|
|
wrapperManagerLibTests = import ./lib { inherit pkgs; };
|
|
|
|
inherit (pkgs) lib;
|
2024-07-13 09:00:06 +00:00
|
|
|
in
|
|
|
|
{
|
2025-01-12 09:58:39 +00:00
|
|
|
configs =
|
|
|
|
let
|
|
|
|
configs' = import ./configs { inherit pkgs; };
|
|
|
|
updateTestName =
|
|
|
|
configName: package:
|
|
|
|
lib.mapAttrs' (n: v: lib.nameValuePair "${configName}-${n}" v) package.wrapperManagerTests;
|
|
|
|
in
|
2024-09-21 11:32:08 +00:00
|
|
|
lib.concatMapAttrs updateTestName configs';
|
|
|
|
|
|
|
|
lib =
|
2024-07-31 13:51:40 +00:00
|
|
|
pkgs.runCommand "wrapper-manager-fds-lib-test"
|
|
|
|
{
|
2024-09-21 11:32:08 +00:00
|
|
|
testData = builtins.toJSON wrapperManagerLibTests;
|
2024-07-31 13:51:40 +00:00
|
|
|
passAsFile = [ "testData" ];
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
yajsv
|
|
|
|
jq
|
|
|
|
];
|
|
|
|
}
|
|
|
|
''
|
|
|
|
yajsv -s "${./lib/tests.schema.json}" "$testDataPath" && touch $out || jq . "$testDataPath"
|
|
|
|
'';
|
2024-07-01 14:27:03 +00:00
|
|
|
}
|