postgresql: fetch from GitHub instead of tarball

This allows us to fetch newer releases a few days before they are
officially released and the tarballs have been pushed.

The regular release cycle is like this:
- Sunday, the release notes are committed.
- Monday, the version is "stamped", i.e. the version bump committed.
- Thursday, the release is made.

There are not going to be any changes from Monday on, so we can kick off
our builds at that time already - they still need time to hit unstable
anyway.
This commit is contained in:
Wolfgang Walther
2025-02-18 10:59:47 +01:00
parent 0fc033018c
commit be8612e15a
7 changed files with 31 additions and 20 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import ./generic.nix {
version = "13.18";
hash = "sha256-zuqSq+4qjBlAjSeLaN5qeLa9PbtPotZT+nynRdZmqrE=";
rev = "ref/tags/REL_13_18";
hash = "sha256-Lw8rd6MAvKZ7/Y1a0ccauL7K6lHxsp5huK4QFun9wcc=";
muslPatches = {
disable-test-collate-icu-utf8 = {
url = "https://git.alpinelinux.org/aports/plain/main/postgresql13/disable-test-collate.icu.utf8.patch?id=69faa146ec9fff3b981511068f17f9e629d4688b";
+2 -1
View File
@@ -1,6 +1,7 @@
import ./generic.nix {
version = "14.15";
hash = "sha256-AuiR4xS06e4ky9eAKNq3xz+cG6PjCDW8vvcf4iBAH8U=";
rev = "ref/tags/REL_14_15";
hash = "sha256-slb6UiJyIzDaNS782/ZDVztBw4B4qTY6OuEWI+HZ+Ds=";
muslPatches = {
disable-test-collate-icu-utf8 = {
url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/disable-test-collate.icu.utf8.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7";
+2 -1
View File
@@ -1,6 +1,7 @@
import ./generic.nix {
version = "15.10";
hash = "sha256-VavnONRB8OWGWLPsb4gJenE7XjtzE59iMNe1xMOJ5XM=";
rev = "ref/tags/REL_15_10";
hash = "sha256-5RNcoqcmcYCCBK8bmz2Wruky1mzDh5SrDF3OOV31GMw=";
muslPatches = {
dont-use-locale-a = {
url = "https://git.alpinelinux.org/aports/plain/main/postgresql15/dont-use-locale-a-on-musl.patch?id=f424e934e6d076c4ae065ce45e734aa283eecb9c";
+2 -1
View File
@@ -1,6 +1,7 @@
import ./generic.nix {
version = "16.6";
hash = "sha256-Izac2szUUnCsXcww+p2iBdW+M/pQXh8XoEGNLK7KR3s=";
rev = "ref/tags/REL_16_6";
hash = "sha256-cw/bSR9ZI6HFtbSTQxvuB7ng7V6g5SZZ7B0oMCz4E7Q=";
muslPatches = {
dont-use-locale-a = {
url = "https://git.alpinelinux.org/aports/plain/main/postgresql16/dont-use-locale-a-on-musl.patch?id=08a24be262339fd093e641860680944c3590238e";
+2 -1
View File
@@ -1,6 +1,7 @@
import ./generic.nix {
version = "17.2";
hash = "sha256-gu8nwK83UWldf2Ti2WNYMAX7tqDD32PQ5LQiEdcCEWQ=";
rev = "ref/tags/REL_17_2";
hash = "sha256-P7IwvMcOI6vW14PiB2R0NEzAEPeaKg0zaUKTw2GJ5DA=";
muslPatches = {
dont-use-locale-a = {
url = "https://git.alpinelinux.org/aports/plain/main/postgresql17/dont-use-locale-a-on-musl.patch?id=d69ead2c87230118ae7f72cef7d761e761e1f37e";
+14 -11
View File
@@ -4,6 +4,7 @@ let
# utils
{
stdenv,
fetchFromGitHub,
fetchpatch,
fetchurl,
lib,
@@ -13,6 +14,7 @@ let
# source specification
hash,
muslPatches ? { },
rev,
version,
# runtime dependencies
@@ -130,9 +132,12 @@ let
inherit version;
pname = pname + lib.optionalString jitSupport "-jit";
src = fetchurl {
url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2";
inherit hash;
src = fetchFromGitHub {
owner = "postgres";
repo = "postgres";
# rev, not tag, on purpose: allows updating when new versions
# are "stamped" a few days before release (tag).
inherit hash rev;
};
__structuredAttrs = true;
@@ -215,22 +220,20 @@ let
nativeBuildInputs =
[
bison
docbook-xsl-nons
docbook_xml_dtd_45
flex
libxml2
libxslt
makeWrapper
perl
pkg-config
removeReferencesTo
]
++ lib.optionals jitSupport [
llvmPackages.llvm.dev
nukeReferences
]
++ lib.optionals (atLeast "17") [
bison
flex
perl
docbook_xml_dtd_45
docbook-xsl-nons
libxslt
];
enableParallelBuilding = true;
+7 -4
View File
@@ -1,7 +1,7 @@
{
# utils
stdenv,
fetchurl,
fetchFromGitHub,
lib,
# runtime dependencies
@@ -31,9 +31,12 @@ stdenv.mkDerivation (finalAttrs: {
pname = "libpq";
version = "17.2";
src = fetchurl {
url = "mirror://postgresql/source/v${finalAttrs.version}/postgresql-${finalAttrs.version}.tar.bz2";
hash = "sha256-gu8nwK83UWldf2Ti2WNYMAX7tqDD32PQ5LQiEdcCEWQ=";
src = fetchFromGitHub {
owner = "postgres";
repo = "postgres";
# rev, not tag, on purpose: see generic.nix.
rev = "ref/tags/REL_17_2";
hash = "sha256-P7IwvMcOI6vW14PiB2R0NEzAEPeaKg0zaUKTw2GJ5DA=";
};
__structuredAttrs = true;