diff options
author | Wolfgang Walther <walther@technowledgy.de> | 2024-02-29 14:53:46 +0100 |
---|---|---|
committer | Wolfgang Walther <walther@technowledgy.de> | 2024-03-15 18:51:02 +0100 |
commit | b301c01e3121068b29c04d26fdcd2a71db92fc4d (patch) | |
tree | d27aa4080b8de4156f752a617babceef801df256 /pkgs | |
parent | 82e6c4a6094579fa1e3aace27015f5c505e6f6e0 (diff) | |
download | nixlib-b301c01e3121068b29c04d26fdcd2a71db92fc4d.tar nixlib-b301c01e3121068b29c04d26fdcd2a71db92fc4d.tar.gz nixlib-b301c01e3121068b29c04d26fdcd2a71db92fc4d.tar.bz2 nixlib-b301c01e3121068b29c04d26fdcd2a71db92fc4d.tar.lz nixlib-b301c01e3121068b29c04d26fdcd2a71db92fc4d.tar.xz nixlib-b301c01e3121068b29c04d26fdcd2a71db92fc4d.tar.zst nixlib-b301c01e3121068b29c04d26fdcd2a71db92fc4d.zip |
postgresql: refactor to move musl patches into versioned .nix files
This makes it obvious that the required argument muslPatches must be passed when creating a new version file. Pure refactor, not changing any derivations.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/servers/sql/postgresql/12.nix | 6 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/13.nix | 10 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/14.nix | 10 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/15.nix | 6 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/16.nix | 6 | ||||
-rw-r--r-- | pkgs/servers/sql/postgresql/generic.nix | 45 |
6 files changed, 40 insertions, 43 deletions
diff --git a/pkgs/servers/sql/postgresql/12.nix b/pkgs/servers/sql/postgresql/12.nix index d29fc7683048..9e0388be0451 100644 --- a/pkgs/servers/sql/postgresql/12.nix +++ b/pkgs/servers/sql/postgresql/12.nix @@ -1,4 +1,10 @@ import ./generic.nix { version = "12.18"; hash = "sha256-T5kZcl2UHOmGjgf+HtHTqGdIWZtIM4ZUdYOSi3TDkYo="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/testing/postgresql12/icu-collations-hack.patch?id=d5227c91adda59d4e7f55f13468f0314e8869174"; + hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/13.nix b/pkgs/servers/sql/postgresql/13.nix index ba458dfd1909..a4870812acdb 100644 --- a/pkgs/servers/sql/postgresql/13.nix +++ b/pkgs/servers/sql/postgresql/13.nix @@ -1,4 +1,14 @@ import ./generic.nix { version = "13.14"; hash = "sha256-uN8HhVGJiWC9UA3F04oXfpkFN234H+fytmChQH+mpe0="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/icu-collations-hack.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; + hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; + }; + disable-test-collate-icu-utf8 = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql13/disable-test-collate.icu.utf8.patch?id=69faa146ec9fff3b981511068f17f9e629d4688b"; + hash = "sha256-jS/qxezaiaKhkWeMCXwpz1SDJwUWn9tzN0uKaZ3Ph2Y="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/14.nix b/pkgs/servers/sql/postgresql/14.nix index b0de8af650ae..2de876cf4ad6 100644 --- a/pkgs/servers/sql/postgresql/14.nix +++ b/pkgs/servers/sql/postgresql/14.nix @@ -1,4 +1,14 @@ import ./generic.nix { version = "14.11"; hash = "sha256-pnC9fc4i3K1Cl7JhE2s7HUoJpvVBcZViqhTKY78paKg="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/icu-collations-hack.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; + hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; + }; + disable-test-collate-icu-utf8 = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/disable-test-collate.icu.utf8.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; + hash = "sha256-jXe23AxnFjEl+TZQm4R7rStk2Leo08ctxMNmu1xr5zM="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/15.nix b/pkgs/servers/sql/postgresql/15.nix index 00dfc0cbbc19..f633dc975085 100644 --- a/pkgs/servers/sql/postgresql/15.nix +++ b/pkgs/servers/sql/postgresql/15.nix @@ -1,4 +1,10 @@ import ./generic.nix { version = "15.6"; hash = "sha256-hFUUbtnGnJOlfelUrq0DAsr60DXCskIXXWqh4X68svs="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql15/icu-collations-hack.patch?id=f424e934e6d076c4ae065ce45e734aa283eecb9c"; + hash = "sha256-HgtmhF4OJYU9macGJbTB9PjQi/yW7c3Akm3U0niWs8I="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/16.nix b/pkgs/servers/sql/postgresql/16.nix index cdc37b7c62f5..6a6420643b31 100644 --- a/pkgs/servers/sql/postgresql/16.nix +++ b/pkgs/servers/sql/postgresql/16.nix @@ -1,4 +1,10 @@ import ./generic.nix { version = "16.2"; hash = "sha256-RG6IKU28LJCFq0twYaZG+mBLS+wDUh1epnHC5a2bKVI="; + muslPatches = { + icu-collations-hack = { + url = "https://git.alpinelinux.org/aports/plain/main/postgresql16/icu-collations-hack.patch?id=08a24be262339fd093e641860680944c3590238e"; + hash = "sha256-+urQdVIlADLdDPeT68XYv5rljhbK8M/7mPZn/cF+FT0="; + }; + }; } diff --git a/pkgs/servers/sql/postgresql/generic.nix b/pkgs/servers/sql/postgresql/generic.nix index 3b0a3ea643b2..cdcffc5f135c 100644 --- a/pkgs/servers/sql/postgresql/generic.nix +++ b/pkgs/servers/sql/postgresql/generic.nix @@ -15,7 +15,7 @@ let , this, self, newScope, buildEnv # source specification - , version, hash + , version, hash, muslPatches # for tests , testers, nixosTests, thisAttr @@ -121,48 +121,7 @@ let }) ] ++ lib.optionals stdenv'.hostPlatform.isMusl ( - let - self = { - "12" = { - icu-collations-hack = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/testing/postgresql12/icu-collations-hack.patch?id=d5227c91adda59d4e7f55f13468f0314e8869174"; - hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; - }; - }; - "13" = { - inherit (self."14") icu-collations-hack; - disable-test-collate-icu-utf8 = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql13/disable-test-collate.icu.utf8.patch?id=69faa146ec9fff3b981511068f17f9e629d4688b"; - hash = "sha256-jS/qxezaiaKhkWeMCXwpz1SDJwUWn9tzN0uKaZ3Ph2Y="; - }; - }; - "14" = { - icu-collations-hack = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/icu-collations-hack.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; - hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; - }; - disable-test-collate-icu-utf8 = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/disable-test-collate.icu.utf8.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; - hash = "sha256-jXe23AxnFjEl+TZQm4R7rStk2Leo08ctxMNmu1xr5zM="; - }; - }; - "15" = { - icu-collations-hack = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql15/icu-collations-hack.patch?id=f424e934e6d076c4ae065ce45e734aa283eecb9c"; - hash = "sha256-HgtmhF4OJYU9macGJbTB9PjQi/yW7c3Akm3U0niWs8I="; - }; - }; - "16" = { - icu-collations-hack = fetchurl { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql16/icu-collations-hack.patch?id=08a24be262339fd093e641860680944c3590238e"; - hash = "sha256-+urQdVIlADLdDPeT68XYv5rljhbK8M/7mPZn/cF+FT0="; - }; - }; - }; - - patchesForVersion = self.${lib.versions.major version} or (throw "no musl patches for postgresql ${version}"); - in - lib.attrValues patchesForVersion + map fetchurl (lib.attrValues muslPatches) ) ++ lib.optionals stdenv'.isLinux [ (if atLeast "13" then ./patches/socketdir-in-run-13.patch else ./patches/socketdir-in-run.patch) ]; |