1 /* A set of aliases to be used in generated expressions.
3 In case of ambiguity, this will pick a sensible default.
5 This was initially based on cabal2nix's mapping.
7 It'd be nice to generate this mapping, based on a set of derivations.
8 It can not be fully automated, so it should be a expression or tool
9 that makes suggestions about which pkg-config module names can be added.
24 data = importJSON ./pkg-config-data.json;
25 inherit (data) modules;
27 platform = pkgs.stdenv.hostPlatform;
29 isSupported = moduleData:
30 moduleData?supportedWhenPlatformAttrsEqual ->
33 (k: v: platform?${k} && platform.${k} == v)
34 moduleData.supportedWhenPlatformAttrsEqual
37 modulePkgs = flip mapAttrs modules (_moduleName: moduleData:
38 if moduleData?attrPath && isSupported moduleData then
39 getAttrFromPath moduleData.attrPath pkgs