Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions pkgs/by-name/ps/psqlodbc/package.nix
Original file line number Diff line number Diff line change
@@ -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: {
Comment thread
wolfgangwalther marked this conversation as resolved.
Outdated
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=";
};

Expand All @@ -38,26 +40,28 @@ 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}"
]
++ 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;
};
}
})
12 changes: 6 additions & 6 deletions pkgs/servers/sql/postgresql/ext/pg_squeeze.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down
12 changes: 7 additions & 5 deletions pkgs/servers/sql/postgresql/ext/plr.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
buildEnv,
fetchFromGitHub,
lib,
nix-update-script,
pkg-config,
postgresql,
postgresqlBuildExtension,
Expand All @@ -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 ];
Expand All @@ -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
Expand Down
10 changes: 6 additions & 4 deletions pkgs/servers/sql/postgresql/ext/wal2json.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
{
fetchFromGitHub,
lib,
nix-update-script,
nixosTests,
postgresql,
postgresqlBuildExtension,
}:

postgresqlBuildExtension (finalAttrs: {
pname = "wal2json";
version = "${builtins.replaceStrings [ "_" ] [ "." ] (
lib.strings.removePrefix "wal2json_" finalAttrs.src.rev
)}";
version = "2.6";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, because I was confused myself: This causes a rebuild for wal2json, because finalAttrs.src.rev was not correct anymore after the change to src.tag. Thus the version was not set correctly, but now it is, again.

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 = {
Expand Down
Loading