From 0d9b64a98ca598efbd7f949b1f531a47722b920f Mon Sep 17 00:00:00 2001 From: apfelkuchen06 Date: Mon, 21 Oct 2024 22:24:10 +0200 Subject: [PATCH] postgresqlPackages.sqlite_fdw: init at 2.4.0 --- pkgs/servers/sql/postgresql/ext/default.nix | 2 ++ .../servers/sql/postgresql/ext/sqlite_fdw.nix | 34 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/servers/sql/postgresql/ext/sqlite_fdw.nix diff --git a/pkgs/servers/sql/postgresql/ext/default.nix b/pkgs/servers/sql/postgresql/ext/default.nix index 0a0a41aeb128..da873af68f3b 100644 --- a/pkgs/servers/sql/postgresql/ext/default.nix +++ b/pkgs/servers/sql/postgresql/ext/default.nix @@ -107,6 +107,8 @@ self: super: { rum = super.callPackage ./rum.nix { }; + sqlite_fdw = super.callPackage ./sqlite_fdw.nix { }; + tsja = super.callPackage ./tsja.nix { }; wal2json = super.callPackage ./wal2json.nix { }; diff --git a/pkgs/servers/sql/postgresql/ext/sqlite_fdw.nix b/pkgs/servers/sql/postgresql/ext/sqlite_fdw.nix new file mode 100644 index 000000000000..d33925a5d6bb --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/sqlite_fdw.nix @@ -0,0 +1,34 @@ +{ + lib, + fetchFromGitHub, + sqlite, + postgresql, + buildPostgresqlExtension, +}: + +buildPostgresqlExtension rec { + pname = "sqlite_fdw"; + # TODO: Check whether PostgreSQL 17 is still broken after next update. + version = "2.4.0"; + + src = fetchFromGitHub { + owner = "pgspider"; + repo = "sqlite_fdw"; + rev = "v${version}"; + hash = "sha256-u51rcKUH2nZyZbI2g3crzHt5jiacbTq4xmfP3JgqnnM="; + }; + + buildInputs = [ sqlite ]; + + makeFlags = [ "USE_PGXS=1" ]; + + meta = { + description = "SQLite Foreign Data Wrapper for PostgreSQL"; + homepage = "https://github.com/pgspider/sqlite_fdw"; + changelog = "https://github.com/pgspider/sqlite_fdw/releases/tag/v${version}"; + maintainers = with lib.maintainers; [ apfelkuchen6 ]; + platforms = lib.platforms.unix; + license = lib.licenses.postgresql; + broken = lib.versionAtLeast postgresql.version "17"; + }; +}