postgresql: refactor to remove psqlSchema argument

The passthru attribute is still set, but automatically created from
the major version number. Fewer moving parts decrease the chance
for mistakes.
This commit is contained in:
Wolfgang Walther 2024-03-02 12:37:04 +01:00
parent a92a323a1d
commit 82e6c4a609
No known key found for this signature in database
GPG Key ID: B39893FA5F65CAE1
6 changed files with 3 additions and 7 deletions

View File

@ -1,5 +1,4 @@
import ./generic.nix {
version = "12.18";
psqlSchema = "12";
hash = "sha256-T5kZcl2UHOmGjgf+HtHTqGdIWZtIM4ZUdYOSi3TDkYo=";
}

View File

@ -1,5 +1,4 @@
import ./generic.nix {
version = "13.14";
psqlSchema = "13";
hash = "sha256-uN8HhVGJiWC9UA3F04oXfpkFN234H+fytmChQH+mpe0=";
}

View File

@ -1,5 +1,4 @@
import ./generic.nix {
version = "14.11";
psqlSchema = "14";
hash = "sha256-pnC9fc4i3K1Cl7JhE2s7HUoJpvVBcZViqhTKY78paKg=";
}

View File

@ -1,5 +1,4 @@
import ./generic.nix {
version = "15.6";
psqlSchema = "15";
hash = "sha256-hFUUbtnGnJOlfelUrq0DAsr60DXCskIXXWqh4X68svs=";
}

View File

@ -1,5 +1,4 @@
import ./generic.nix {
version = "16.2";
psqlSchema = "16";
hash = "sha256-RG6IKU28LJCFq0twYaZG+mBLS+wDUh1epnHC5a2bKVI=";
}

View File

@ -15,7 +15,7 @@ let
, this, self, newScope, buildEnv
# source specification
, version, hash, psqlSchema
, version, hash
# for tests
, testers, nixosTests, thisAttr
@ -262,7 +262,8 @@ let
};
in
{
inherit psqlSchema jitSupport;
inherit jitSupport;
psqlSchema = lib.versions.major version;
withJIT = if jitSupport then this else jitToggle;
withoutJIT = if jitSupport then jitToggle else this;