1self:
2let
3 versions = {
4 postgresql_12 = ./12.nix;
5 postgresql_13 = ./13.nix;
6 postgresql_14 = ./14.nix;
7 postgresql_15 = ./15.nix;
8 postgresql_16 = ./16.nix;
9 };
10
11 mkAttributes = jitSupport:
12 self.lib.mapAttrs' (version: path:
13 let
14 attrName = if jitSupport then "${version}_jit" else version;
15 in
16 self.lib.nameValuePair attrName (import path {
17 inherit jitSupport self;
18 })
19 ) versions;
20
21in
22# variations without and with JIT
23(mkAttributes false) // (mkAttributes true)