mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 01:33:20 +00:00
postgresql: refactor to split up default.nix (2/2)
The recommended [1] structure for a package regarding versioning is to have each version in a separate file. This commit just mechanically copies code around without any changes. Pure refactor, not changing any derivations. [1]: pkgs/README.md
This commit is contained in:
parent
9af8c0a3b7
commit
1d9f2bd726
5
pkgs/servers/sql/postgresql/12.nix
Normal file
5
pkgs/servers/sql/postgresql/12.nix
Normal file
@ -0,0 +1,5 @@
|
||||
import ./generic.nix {
|
||||
version = "12.18";
|
||||
psqlSchema = "12";
|
||||
hash = "sha256-T5kZcl2UHOmGjgf+HtHTqGdIWZtIM4ZUdYOSi3TDkYo=";
|
||||
}
|
5
pkgs/servers/sql/postgresql/13.nix
Normal file
5
pkgs/servers/sql/postgresql/13.nix
Normal file
@ -0,0 +1,5 @@
|
||||
import ./generic.nix {
|
||||
version = "13.14";
|
||||
psqlSchema = "13";
|
||||
hash = "sha256-uN8HhVGJiWC9UA3F04oXfpkFN234H+fytmChQH+mpe0=";
|
||||
}
|
5
pkgs/servers/sql/postgresql/14.nix
Normal file
5
pkgs/servers/sql/postgresql/14.nix
Normal file
@ -0,0 +1,5 @@
|
||||
import ./generic.nix {
|
||||
version = "14.11";
|
||||
psqlSchema = "14";
|
||||
hash = "sha256-pnC9fc4i3K1Cl7JhE2s7HUoJpvVBcZViqhTKY78paKg=";
|
||||
}
|
5
pkgs/servers/sql/postgresql/15.nix
Normal file
5
pkgs/servers/sql/postgresql/15.nix
Normal file
@ -0,0 +1,5 @@
|
||||
import ./generic.nix {
|
||||
version = "15.6";
|
||||
psqlSchema = "15";
|
||||
hash = "sha256-hFUUbtnGnJOlfelUrq0DAsr60DXCskIXXWqh4X68svs=";
|
||||
}
|
5
pkgs/servers/sql/postgresql/16.nix
Normal file
5
pkgs/servers/sql/postgresql/16.nix
Normal file
@ -0,0 +1,5 @@
|
||||
import ./generic.nix {
|
||||
version = "16.2";
|
||||
psqlSchema = "16";
|
||||
hash = "sha256-RG6IKU28LJCFq0twYaZG+mBLS+wDUh1epnHC5a2bKVI=";
|
||||
}
|
43
pkgs/servers/sql/postgresql/default.nix
Normal file
43
pkgs/servers/sql/postgresql/default.nix
Normal file
@ -0,0 +1,43 @@
|
||||
let
|
||||
mkPackages = self: {
|
||||
postgresql_12 = import ./12.nix {
|
||||
this = self.postgresql_12;
|
||||
thisAttr = "postgresql_12";
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_13 = import ./13.nix {
|
||||
this = self.postgresql_13;
|
||||
thisAttr = "postgresql_13";
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_14 = import ./14.nix {
|
||||
this = self.postgresql_14;
|
||||
thisAttr = "postgresql_14";
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_15 = import ./15.nix {
|
||||
this = self.postgresql_15;
|
||||
thisAttr = "postgresql_15";
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_16 = import ./16.nix {
|
||||
this = self.postgresql_16;
|
||||
thisAttr = "postgresql_16";
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
|
||||
in self:
|
||||
let packages = mkPackages self; in
|
||||
packages
|
||||
// self.lib.mapAttrs'
|
||||
(attrName: postgres: self.lib.nameValuePair "${attrName}_jit" (postgres.override rec {
|
||||
jitSupport = true;
|
||||
thisAttr = "${attrName}_jit";
|
||||
this = self.${thisAttr};
|
||||
}))
|
||||
packages
|
@ -353,60 +353,9 @@ let
|
||||
passthru.psqlSchema = postgresql.psqlSchema;
|
||||
};
|
||||
|
||||
mkPackages = self: {
|
||||
postgresql_12 = self.callPackage generic {
|
||||
version = "12.18";
|
||||
psqlSchema = "12";
|
||||
hash = "sha256-T5kZcl2UHOmGjgf+HtHTqGdIWZtIM4ZUdYOSi3TDkYo=";
|
||||
this = self.postgresql_12;
|
||||
thisAttr = "postgresql_12";
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_13 = self.callPackage generic {
|
||||
version = "13.14";
|
||||
psqlSchema = "13";
|
||||
hash = "sha256-uN8HhVGJiWC9UA3F04oXfpkFN234H+fytmChQH+mpe0=";
|
||||
this = self.postgresql_13;
|
||||
thisAttr = "postgresql_13";
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_14 = self.callPackage generic {
|
||||
version = "14.11";
|
||||
psqlSchema = "14";
|
||||
hash = "sha256-pnC9fc4i3K1Cl7JhE2s7HUoJpvVBcZViqhTKY78paKg=";
|
||||
this = self.postgresql_14;
|
||||
thisAttr = "postgresql_14";
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_15 = self.callPackage generic {
|
||||
version = "15.6";
|
||||
psqlSchema = "15";
|
||||
hash = "sha256-hFUUbtnGnJOlfelUrq0DAsr60DXCskIXXWqh4X68svs=";
|
||||
this = self.postgresql_15;
|
||||
thisAttr = "postgresql_15";
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_16 = self.callPackage generic {
|
||||
version = "16.2";
|
||||
psqlSchema = "16";
|
||||
hash = "sha256-RG6IKU28LJCFq0twYaZG+mBLS+wDUh1epnHC5a2bKVI=";
|
||||
this = self.postgresql_16;
|
||||
thisAttr = "postgresql_16";
|
||||
inherit self;
|
||||
};
|
||||
};
|
||||
|
||||
in self:
|
||||
let packages = mkPackages self; in
|
||||
packages
|
||||
// self.lib.mapAttrs'
|
||||
(attrName: postgres: self.lib.nameValuePair "${attrName}_jit" (postgres.override rec {
|
||||
jitSupport = true;
|
||||
thisAttr = "${attrName}_jit";
|
||||
this = self.${thisAttr};
|
||||
}))
|
||||
packages
|
||||
in
|
||||
# passed by <major>.nix
|
||||
versionArgs:
|
||||
# passed by default.nix
|
||||
{ self, ... } @defaultArgs:
|
||||
self.callPackage generic (defaultArgs // versionArgs)
|
||||
|
@ -26735,7 +26735,7 @@ with pkgs;
|
||||
|
||||
timescaledb-tune = callPackage ../development/tools/database/timescaledb-tune { };
|
||||
|
||||
inherit (import ../servers/sql/postgresql/generic.nix pkgs)
|
||||
inherit (import ../servers/sql/postgresql pkgs)
|
||||
postgresql_12
|
||||
postgresql_13
|
||||
postgresql_14
|
||||
|
Loading…
Reference in New Issue
Block a user