1 # Call nix-build on this file to run all tests in this directory
3 # This produces a link farm derivation with the original attrs
5 # You can run parts of the "hierarchy" with for example:
6 # nix-build -A java-properties
7 # See `structured` below.
9 { pkgs ? import ../../.. { } }:
11 inherit (pkgs.lib) mapAttrs mapAttrsToList isDerivation mergeAttrs foldl' attrValues recurseIntoAttrs;
14 formats = import ./formats.nix { inherit pkgs; };
15 java-properties = recurseIntoAttrs {
16 jdk8 = pkgs.callPackage ../formats/java-properties/test { jdk = pkgs.jdk8; };
17 jdk11 = pkgs.callPackage ../formats/java-properties/test { jdk = pkgs.jdk11_headless; };
18 jdk17 = pkgs.callPackage ../formats/java-properties/test { jdk = pkgs.jdk17_headless; };
20 libconfig = recurseIntoAttrs (import ../formats/libconfig/test { inherit pkgs; });
31 then { "${prefix}${k}" = v; }
32 else if v?recurseForDerivations
33 then flatten "${prefix}${k}-" (removeAttrs v [ "recurseForDerivations" ])
34 else builtins.trace v throw "expected derivation or recurseIntoAttrs")
40 # It has to be a link farm for inclusion in the hydra unstable jobset.
41 pkgs.linkFarm "pkgs-lib-formats-tests"
43 (k: v: { name = k; path = v; })
44 (flatten "" structured)