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; };
21 libconfig = recurseIntoAttrs (import ../formats/libconfig/test { inherit pkgs; });
23 hocon = recurseIntoAttrs (import ../formats/hocon/test { inherit pkgs; });
34 then { "${prefix}${k}" = v; }
35 else if v?recurseForDerivations
36 then flatten "${prefix}${k}-" (removeAttrs v [ "recurseForDerivations" ])
37 else builtins.trace v throw "expected derivation or recurseIntoAttrs")
43 # It has to be a link farm for inclusion in the hydra unstable jobset.
44 pkgs.linkFarm "pkgs-lib-formats-tests"
46 (k: v: { name = k; path = v; })
47 (flatten "" structured)