postgresqlPackages: fix update scripts with PG versioning scheme (#422133)
This commit is contained in:
@@ -1,27 +1,29 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
autoreconfHook,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
libpq,
|
||||
nix-update-script,
|
||||
openssl,
|
||||
stdenv,
|
||||
|
||||
withLibiodbc ? false,
|
||||
libiodbc,
|
||||
|
||||
withUnixODBC ? true,
|
||||
unixODBC,
|
||||
}:
|
||||
|
||||
assert lib.xor withLibiodbc withUnixODBC;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "psqlodbc";
|
||||
version = "${builtins.replaceStrings [ "_" ] [ "." ] (lib.strings.removePrefix "REL-" src.tag)}";
|
||||
version = "17.00.0006";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "postgresql-interfaces";
|
||||
repo = "psqlodbc";
|
||||
tag = "REL-17_00_0006";
|
||||
tag = "REL-${lib.replaceString "." "_" finalAttrs.version}";
|
||||
hash = "sha256-iu1PWkfOyWtMmy7/8W+acu8v+e8nUPkCIHtVNZ8HzRg=";
|
||||
};
|
||||
|
||||
@@ -38,14 +40,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
}
|
||||
// lib.optionalAttrs withUnixODBC {
|
||||
fancyName = "PostgreSQL";
|
||||
driver = "lib/psqlodbcw.so";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"CPPFLAGS=-DSQLCOLATTRIBUTE_SQLLEN" # needed for cross
|
||||
"--with-libpq=${lib.getDev libpq}"
|
||||
@@ -53,11 +47,21 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optional withLibiodbc "--with-iodbc=${libiodbc}"
|
||||
++ lib.optional withUnixODBC "--with-unixodbc=${unixODBC}";
|
||||
|
||||
meta = with lib; {
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [ "--version-regex=^REL-(\\d+)_(\\d+)_(\\d+)$" ];
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs withUnixODBC {
|
||||
fancyName = "PostgreSQL";
|
||||
driver = "lib/psqlodbcw.so";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://odbc.postgresql.org/";
|
||||
description = "ODBC driver for PostgreSQL";
|
||||
license = licenses.lgpl2;
|
||||
platforms = platforms.unix;
|
||||
license = lib.licenses.lgpl2;
|
||||
platforms = lib.platforms.unix;
|
||||
teams = libpq.meta.teams;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
|
||||
postgresqlBuildExtension (finalAttrs: {
|
||||
pname = "pg_squeeze";
|
||||
version = "${builtins.replaceStrings [ "_" ] [ "." ] (
|
||||
lib.strings.removePrefix "REL" finalAttrs.src.rev
|
||||
)}";
|
||||
version = "1.9.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cybertec-postgresql";
|
||||
repo = "pg_squeeze";
|
||||
tag = "REL1_7_0";
|
||||
hash = "sha256-Kh1wSOvV5Rd1CG/na3yzbWzvaR8SJ6wmTZOnM+lbgik=";
|
||||
tag = "REL${lib.replaceString "." "_" finalAttrs.version}";
|
||||
hash = "sha256-RrG7qeX0NQ4cq6N+9uVfalNW+HfiSt4wcjeZjInnfgE=";
|
||||
};
|
||||
|
||||
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=REL(.*)" ]; };
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [ "--version-regex=^REL(\\d+)_(\\d+)_(\\d+)$" ];
|
||||
};
|
||||
passthru.tests.extension = postgresqlTestExtension {
|
||||
inherit (finalAttrs) finalPackage;
|
||||
postgresqlExtraSettings = ''
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
buildEnv,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
nix-update-script,
|
||||
pkg-config,
|
||||
postgresql,
|
||||
postgresqlBuildExtension,
|
||||
@@ -12,15 +13,13 @@
|
||||
|
||||
postgresqlBuildExtension (finalAttrs: {
|
||||
pname = "plr";
|
||||
version = "${builtins.replaceStrings [ "_" ] [ "." ] (
|
||||
lib.strings.removePrefix "REL" finalAttrs.src.rev
|
||||
)}";
|
||||
version = "8.4.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "postgres-plr";
|
||||
repo = "plr";
|
||||
tag = "REL8_4_7";
|
||||
hash = "sha256-PdvFEmtKfLT/xfaf6obomPR5hKC9F+wqpfi1heBphRk=";
|
||||
tag = "REL${lib.replaceString "." "_" finalAttrs.version}";
|
||||
hash = "sha256-FLL61HsZ6WaWBP9NqrJjhMFSVyVBIpVO0wv+kXMuAaU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
@@ -29,6 +28,9 @@ postgresqlBuildExtension (finalAttrs: {
|
||||
makeFlags = [ "USE_PGXS=1" ];
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
extraArgs = [ "--version-regex=^REL(\\d+)_(\\d+)_(\\d+)$" ];
|
||||
};
|
||||
withPackages =
|
||||
f:
|
||||
let
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
nix-update-script,
|
||||
nixosTests,
|
||||
postgresql,
|
||||
postgresqlBuildExtension,
|
||||
@@ -8,19 +9,20 @@
|
||||
|
||||
postgresqlBuildExtension (finalAttrs: {
|
||||
pname = "wal2json";
|
||||
version = "${builtins.replaceStrings [ "_" ] [ "." ] (
|
||||
lib.strings.removePrefix "wal2json_" finalAttrs.src.rev
|
||||
)}";
|
||||
version = "2.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "eulerto";
|
||||
repo = "wal2json";
|
||||
tag = "wal2json_2_6";
|
||||
tag = "wal2json_${lib.replaceString "." "_" finalAttrs.version}";
|
||||
hash = "sha256-+QoACPCKiFfuT2lJfSUmgfzC5MXf75KpSoc2PzPxKyM=";
|
||||
};
|
||||
|
||||
makeFlags = [ "USE_PGXS=1" ];
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [ "--version-regex=^wal2json_(\\d+)_(\\d+)$" ];
|
||||
};
|
||||
passthru.tests = nixosTests.postgresql.wal2json.passthru.override postgresql;
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user