at 25.11-pre 40 lines 1.3 kB view raw
1self: 2let 3 # Before removing an EOL major version, make sure to check the versioning policy in: 4 # <nixpkgs>/nixos/modules/services/databases/postgresql.md 5 # 6 # Before removing, make sure to update it to the last minor version - and if only in 7 # an immediately preceding commit. This allows people relying on that old major version 8 # for a bit longer to still update up to this commit to at least get the latest minor 9 # version. In other words: Do not remove the second-to-last minor version from nixpkgs, 10 # yet. Update first. 11 versions = { 12 postgresql_13 = ./13.nix; 13 postgresql_14 = ./14.nix; 14 postgresql_15 = ./15.nix; 15 postgresql_16 = ./16.nix; 16 postgresql_17 = ./17.nix; 17 }; 18 19 mkAttributes = 20 jitSupport: 21 self.lib.mapAttrs' ( 22 version: path: 23 let 24 attrName = if jitSupport then "${version}_jit" else version; 25 postgresql = import path { inherit self; }; 26 attrValue = if jitSupport then postgresql.withJIT else postgresql.withoutJIT; 27 in 28 self.lib.nameValuePair attrName attrValue 29 ) versions; 30 31 libpq = self.callPackage ./libpq.nix { }; 32 33in 34{ 35 # variations without and with JIT 36 postgresqlVersions = mkAttributes false; 37 postgresqlJitVersions = mkAttributes true; 38 39 inherit libpq; 40}