1{ system ? builtins.currentSystem
2, config ? { }
3, pkgs ? import ../../.. { inherit system config; }
4, kernelVersionsToTest ? [ "5.4" "latest" ]
5}:
6
7with pkgs.lib;
8
9let
10 tests = let callTest = p: flip (import p) { inherit system pkgs; }; in {
11 basic = callTest ./basic.nix;
12 namespaces = callTest ./namespaces.nix;
13 wg-quick = callTest ./wg-quick.nix;
14 generated = callTest ./generated.nix;
15 };
16in
17
18listToAttrs (
19 flip concatMap kernelVersionsToTest (version:
20 let
21 v' = replaceStrings [ "." ] [ "_" ] version;
22 in
23 flip mapAttrsToList tests (name: test:
24 nameValuePair "wireguard-${name}-linux-${v'}" (test { kernelPackages = pkgs."linuxPackages_${v'}"; })
25 )
26 )
27)