Merge branch 'master' into postgresql-plugins-bin
This commit is contained in:
@@ -13,13 +13,13 @@ let
|
||||
in
|
||||
buildGoPackage rec {
|
||||
name = "cockroach-${version}";
|
||||
version = "19.1.0";
|
||||
version = "19.1.1";
|
||||
|
||||
goPackagePath = "github.com/cockroachdb/cockroach";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://binaries.cockroachdb.com/cockroach-v${version}.src.tgz";
|
||||
sha256 = "1kb93jxgxc54c23v72ka116b2j7m82c1jghm7njd64qkbbcgrkkw";
|
||||
sha256 = "1vbz5j0y9ri8c99k8fc5rnwigay478p1mac5g402639ilkqd41fc";
|
||||
};
|
||||
|
||||
inherit nativeBuildInputs buildInputs;
|
||||
@@ -59,6 +59,6 @@ buildGoPackage rec {
|
||||
description = "A scalable, survivable, strongly-consistent SQL database";
|
||||
license = licenses.asl20;
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
||||
maintainers = with maintainers; [ rushmorem thoughtpolice ];
|
||||
maintainers = with maintainers; [ rushmorem thoughtpolice rvolosatovs ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
diff --git a/include/my_global.h b/include/my_global.h
|
||||
index cb31ae2..2866f87 100644
|
||||
--- a/include/my_global.h
|
||||
+++ b/include/my_global.h
|
||||
@@ -803,12 +803,6 @@ inline unsigned long long my_double2ulonglong(double d)
|
||||
#endif
|
||||
|
||||
#ifndef isfinite
|
||||
-#ifdef HAVE_FINITE
|
||||
-#define isfinite(x) finite(x)
|
||||
-#else
|
||||
-#define finite(x) (1.0 / fabs(x) > 0.0)
|
||||
-#endif /* HAVE_FINITE */
|
||||
-#elif (__cplusplus >= 201103L)
|
||||
#include <cmath>
|
||||
static inline bool isfinite(double x) { return std::isfinite(x); }
|
||||
#endif /* isfinite */
|
||||
16
pkgs/servers/sql/mariadb/cmake-plugin-includedir.patch
Normal file
16
pkgs/servers/sql/mariadb/cmake-plugin-includedir.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
diff --git a/cmake/plugin.cmake b/cmake/plugin.cmake
|
||||
index 31291d26..fad52814 100644
|
||||
--- a/cmake/plugin.cmake
|
||||
+++ b/cmake/plugin.cmake
|
||||
@@ -34,6 +34,11 @@ MACRO(MYSQL_ADD_PLUGIN)
|
||||
"LINK_LIBRARIES;DEPENDENCIES"
|
||||
${ARGN}
|
||||
)
|
||||
+
|
||||
+ IF(WITHOUT_SERVER OR ARG_CLIENT)
|
||||
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
|
||||
+ ENDIF()
|
||||
+
|
||||
IF(NOT WITHOUT_SERVER OR ARG_CLIENT)
|
||||
|
||||
# Add common include directories
|
||||
@@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig, ncurses, zlib, xz, lzo, lz4, bzip2, snappy
|
||||
, libiconv, openssl, pcre, boost, judy, bison, libxml2
|
||||
, libiconv, openssl, pcre, boost, judy, bison, libxml2, libkrb5
|
||||
, libaio, libevent, jemalloc, cracklib, systemd, numactl, perl
|
||||
, fixDarwinDylibNames, cctools, CoreServices
|
||||
, asio, buildEnv, check, scons
|
||||
@@ -9,6 +9,8 @@ with stdenv.lib;
|
||||
|
||||
let # in mariadb # spans the whole file
|
||||
|
||||
libExt = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
|
||||
mariadb = everything // {
|
||||
inherit client; # libmysqlclient.so in .out, necessary headers in .dev and utils in .bin
|
||||
server = everything; # a full single-output build, including everything in `client` again
|
||||
@@ -22,14 +24,14 @@ galeraLibs = buildEnv {
|
||||
};
|
||||
|
||||
common = rec { # attributes common to both builds
|
||||
version = "10.2.17";
|
||||
version = "10.3.15";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"https://downloads.mariadb.org/f/mariadb-${version}/source/mariadb-${version}.tar.gz"
|
||||
"https://downloads.mariadb.com/MariaDB/mariadb-${version}/source/mariadb-${version}.tar.gz"
|
||||
];
|
||||
sha256 = "09xy6mgnz22mz8zgqlnddn8nzgs9xlz8lai4a7aa8x78in7hgcz7";
|
||||
sha256 = "0s399nxk2z8fgdr527p64y74zwjc3gpv7psf1n2r6ksl9njr3wr7";
|
||||
name = "mariadb-${version}.tar.gz";
|
||||
};
|
||||
|
||||
@@ -37,52 +39,54 @@ common = rec { # attributes common to both builds
|
||||
|
||||
buildInputs = [
|
||||
ncurses openssl zlib pcre jemalloc libiconv
|
||||
] ++ stdenv.lib.optionals stdenv.isLinux [ libaio systemd ]
|
||||
] ++ stdenv.lib.optionals stdenv.isLinux [ libaio systemd libkrb5 ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ perl fixDarwinDylibNames cctools CoreServices ];
|
||||
|
||||
prePatch = ''
|
||||
sed -i 's,[^"]*/var/log,/var/log,g' storage/mroonga/vendor/groonga/CMakeLists.txt
|
||||
'';
|
||||
|
||||
patches = [ ./cmake-includedir.patch ./include-dirs-path.patch ]
|
||||
++ stdenv.lib.optional stdenv.cc.isClang ./clang-isfinite.patch;
|
||||
patches = [ ./cmake-includedir.patch ]
|
||||
++ optionals stdenv.isDarwin [
|
||||
# Derived from "Fixed c++11 narrowing error"
|
||||
# https://github.com/MariaDB/server/commit/a0dfefb0f8a47145e599a5f1b0dc576fa7634b92
|
||||
./fix-c++11-narrowing-error.patch
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_CONFIG=mysql_release"
|
||||
"-DMANUFACTURER=NixOS.org"
|
||||
"-DDEFAULT_CHARSET=utf8"
|
||||
"-DDEFAULT_COLLATION=utf8_general_ci"
|
||||
"-DDEFAULT_CHARSET=utf8mb4"
|
||||
"-DDEFAULT_COLLATION=utf8mb4_unicode_ci"
|
||||
"-DSECURITY_HARDENED=ON"
|
||||
|
||||
"-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
|
||||
"-DINSTALL_UNIX_ADDRDIR=/run/mysqld/mysqld.sock"
|
||||
"-DINSTALL_BINDIR=bin"
|
||||
"-DINSTALL_DOCDIR=share/doc/mysql"
|
||||
"-DINSTALL_DOCREADMEDIR=share/doc/mysql"
|
||||
"-DINSTALL_INCLUDEDIR=include/mysql"
|
||||
"-DINSTALL_INFODIR=share/mysql/docs"
|
||||
"-DINSTALL_MANDIR=share/man"
|
||||
"-DINSTALL_MYSQLSHAREDIR=share/mysql"
|
||||
"-DINSTALL_SCRIPTDIR=bin"
|
||||
"-DINSTALL_SUPPORTFILESDIR=share/doc/mysql"
|
||||
"-DINSTALL_MYSQLTESTDIR=OFF"
|
||||
"-DINSTALL_SQLBENCHDIR=OFF"
|
||||
|
||||
"-DWITH_ZLIB=system"
|
||||
"-DWITH_SSL=system"
|
||||
"-DWITH_PCRE=system"
|
||||
|
||||
"-DWITH_SAFEMALLOC=OFF"
|
||||
"-DEMBEDDED_LIBRARY=OFF"
|
||||
] ++ optional stdenv.isDarwin [
|
||||
# On Darwin without sandbox, CMake will find the system java and attempt to build with java support, but
|
||||
# then it will fail during the actual build. Let's just disable the flag explicitly until someone decides
|
||||
# to pass in java explicitly. This should have no effect on Linux.
|
||||
# to pass in java explicitly.
|
||||
"-DCONNECT_WITH_JDBC=OFF"
|
||||
|
||||
# Same as above. Somehow on Darwin CMake decides that we support GSS even though we aren't provding the
|
||||
# library through Nix, and then breaks later on. This should have no effect on Linux.
|
||||
"-DPLUGIN_AUTH_GSSAPI=NO"
|
||||
"-DPLUGIN_AUTH_GSSAPI_CLIENT=NO"
|
||||
]
|
||||
++ optional stdenv.isDarwin "-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
|
||||
++ optional stdenv.hostPlatform.isMusl "-DWITHOUT_TOKUDB=1" # mariadb docs say disable this for musl
|
||||
;
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlags="$cmakeFlags -DINSTALL_INCLUDEDIR=''${!outputDev}/include/mysql"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
rm "$out"/lib/*.a
|
||||
find "''${!outputBin}/bin" -name '*test*' -delete
|
||||
'';
|
||||
"-DCURSES_LIBRARY=${ncurses.out}/lib/libncurses.dylib"
|
||||
] ++ optional stdenv.hostPlatform.isMusl [
|
||||
"-DWITHOUT_TOKUDB=1" # mariadb docs say disable this for musl
|
||||
];
|
||||
|
||||
passthru.mysqlVersion = "5.7";
|
||||
|
||||
@@ -98,28 +102,27 @@ common = rec { # attributes common to both builds
|
||||
client = stdenv.mkDerivation (common // {
|
||||
name = "mariadb-client-${common.version}";
|
||||
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
|
||||
propagatedBuildInputs = [ openssl zlib ]; # required from mariadb.pc
|
||||
|
||||
patches = [ ./cmake-plugin-includedir.patch ];
|
||||
|
||||
cmakeFlags = common.cmakeFlags ++ [
|
||||
"-DWITHOUT_SERVER=ON"
|
||||
"-DWITH_WSREP=OFF"
|
||||
];
|
||||
|
||||
preConfigure = common.preConfigure + ''
|
||||
cmakeFlags="$cmakeFlags \
|
||||
-DINSTALL_BINDIR=$bin/bin \
|
||||
-DINSTALL_SCRIPTDIR=$bin/bin \
|
||||
-DINSTALL_SUPPORTFILESDIR=$bin/share/mysql \
|
||||
-DINSTALL_DOCDIR=$bin/share/doc/mysql \
|
||||
-DINSTALL_DOCREADMEDIR=$bin/share/doc/mysql \
|
||||
"
|
||||
'';
|
||||
|
||||
# prevent cycle; it needs to reference $dev
|
||||
postInstall = common.postInstall + ''
|
||||
moveToOutput bin/mysql_config "$dev"
|
||||
moveToOutput bin/mariadb_config "$dev"
|
||||
postInstall = ''
|
||||
rm -r "$out"/share/mysql
|
||||
rm -r "$out"/share/doc
|
||||
rm "$out"/bin/{msql2mysql,mysql_plugin,mytop,wsrep_sst_rsync_wan,mysql_config,mariadb_config}
|
||||
rm "$out"/lib/plugin/{daemon_example.ini,dialog.so,mysql_clear_password.so,sha256_password.so}
|
||||
libmysqlclient_path=$(readlink -f $out/lib/libmysqlclient${libExt})
|
||||
rm "$out"/lib/{libmariadb${libExt},libmysqlclient${libExt},libmysqlclient_r${libExt}}
|
||||
mv "$libmysqlclient_path" "$out"/lib/libmysqlclient${libExt}
|
||||
ln -sv libmysqlclient${libExt} "$out"/lib/libmysqlclient_r${libExt}
|
||||
mkdir -p "$dev"/lib && mv "$out"/lib/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a} "$dev"/lib
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true; # the client should be OK
|
||||
@@ -128,6 +131,8 @@ client = stdenv.mkDerivation (common // {
|
||||
everything = stdenv.mkDerivation (common // {
|
||||
name = "mariadb-${common.version}";
|
||||
|
||||
outputs = [ "out" "dev" "man" ];
|
||||
|
||||
nativeBuildInputs = common.nativeBuildInputs ++ [ bison ];
|
||||
|
||||
buildInputs = common.buildInputs ++ [
|
||||
@@ -137,45 +142,46 @@ everything = stdenv.mkDerivation (common // {
|
||||
|
||||
cmakeFlags = common.cmakeFlags ++ [
|
||||
"-DMYSQL_DATADIR=/var/lib/mysql"
|
||||
"-DINSTALL_SYSCONFDIR=etc/mysql"
|
||||
"-DINSTALL_INFODIR=share/mysql/docs"
|
||||
"-DINSTALL_MANDIR=share/man"
|
||||
"-DINSTALL_PLUGINDIR=lib/mysql/plugin"
|
||||
"-DINSTALL_SCRIPTDIR=bin"
|
||||
"-DINSTALL_SUPPORTFILESDIR=share/mysql"
|
||||
"-DINSTALL_DOCREADMEDIR=share/doc/mysql"
|
||||
"-DINSTALL_DOCDIR=share/doc/mysql"
|
||||
"-DINSTALL_SHAREDIR=share/mysql"
|
||||
"-DINSTALL_MYSQLTESTDIR=OFF"
|
||||
"-DINSTALL_SQLBENCHDIR=OFF"
|
||||
|
||||
"-DENABLED_LOCAL_INFILE=ON"
|
||||
"-DENABLED_LOCAL_INFILE=OFF"
|
||||
"-DWITH_READLINE=ON"
|
||||
"-DWITH_EXTRA_CHARSETS=complex"
|
||||
"-DWITH_EMBEDDED_SERVER=ON"
|
||||
"-DWITH_ARCHIVE_STORAGE_ENGINE=1"
|
||||
"-DWITH_BLACKHOLE_STORAGE_ENGINE=1"
|
||||
"-DWITH_INNOBASE_STORAGE_ENGINE=1"
|
||||
"-DWITH_PARTITION_STORAGE_ENGINE=1"
|
||||
"-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1"
|
||||
"-DWITHOUT_FEDERATED_STORAGE_ENGINE=1"
|
||||
"-DWITH_EXTRA_CHARSETS=all"
|
||||
"-DWITH_EMBEDDED_SERVER=OFF"
|
||||
"-DWITH_UNIT_TESTS=OFF"
|
||||
"-DWITH_WSREP=ON"
|
||||
"-DWITH_INNODB_DISALLOW_WRITES=ON"
|
||||
"-DWITHOUT_EXAMPLE=1"
|
||||
"-DWITHOUT_FEDERATED=1"
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
"-DWITHOUT_OQGRAPH_STORAGE_ENGINE=1"
|
||||
"-DWITHOUT_OQGRAPH=1"
|
||||
"-DWITHOUT_TOKUDB=1"
|
||||
];
|
||||
|
||||
postInstall = common.postInstall + ''
|
||||
preConfigure = ''
|
||||
cmakeFlags="$cmakeFlags \
|
||||
-DINSTALL_SHAREDIR=$dev/share/mysql
|
||||
-DINSTALL_SUPPORTFILESDIR=$dev/share/mysql"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
chmod +x "$out"/bin/wsrep_sst_common
|
||||
rm -r "$out"/data # Don't need testing data
|
||||
rm "$out"/share/man/man1/mysql-test-run.pl.1
|
||||
rm "$out"/bin/rcmysql
|
||||
rm "$out"/bin/{mysql_find_rows,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck}
|
||||
rm "$out"/bin/{mysqldump,mysqlhotcopy,mysqlimport,mysqlshow,mysqlslap,mysqltest}
|
||||
${ # We don't build with GSSAPI on Darwin
|
||||
optionalString (! stdenv.isDarwin) ''
|
||||
rm "$out"/lib/mysql/plugin/auth_gssapi_client.so
|
||||
''
|
||||
}
|
||||
rm "$out"/lib/mysql/plugin/{client_ed25519.so,daemon_example.ini}
|
||||
rm "$out"/lib/{libmysqlclient${libExt},libmysqlclient_r${libExt}}
|
||||
mv "$out"/share/{groonga,groonga-normalizer-mysql} "$out"/share/doc/mysql
|
||||
mkdir -p "$dev"/lib && mv "$out"/lib/{libmariadbclient.a,libmysqlclient.a,libmysqlclient_r.a,libmysqlservices.a} "$dev"/lib
|
||||
'' + optionalString (! stdenv.isDarwin) ''
|
||||
sed -i 's/-mariadb/-mysql/' "$out"/bin/galera_new_cluster
|
||||
'';
|
||||
|
||||
CXXFLAGS = optionalString stdenv.isi686 "-fpermissive"
|
||||
+ optionalString stdenv.isDarwin " -std=c++11";
|
||||
CXXFLAGS = optionalString stdenv.isi686 "-fpermissive";
|
||||
});
|
||||
|
||||
connector-c = stdenv.mkDerivation rec {
|
||||
@@ -221,13 +227,13 @@ connector-c = stdenv.mkDerivation rec {
|
||||
|
||||
galera = stdenv.mkDerivation rec {
|
||||
name = "mariadb-galera-${version}";
|
||||
version = "25.3.24";
|
||||
version = "25.3.26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "codership";
|
||||
repo = "galera";
|
||||
rev = "release_${version}";
|
||||
sha256 = "1yx3rqy7r4w2l3hnrri30hvsa296v8xidi18p5fdzcpmnhnlwjbi";
|
||||
sha256 = "0fs0c1px9lknf1a5wwb12z1hj7j7b6hsfjddggikvkdkrnr2xs1f";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -243,9 +249,9 @@ galera = stdenv.mkDerivation rec {
|
||||
export LIBPATH="${galeraLibs}/lib"
|
||||
'';
|
||||
|
||||
sconsFlags = "ssl=1 system_asio=1 strict_build_flags=0";
|
||||
sconsFlags = "ssl=1 system_asio=0 strict_build_flags=0";
|
||||
|
||||
postInstall = ''
|
||||
installPhase = ''
|
||||
# copied with modifications from scripts/packages/freebsd.sh
|
||||
GALERA_LICENSE_DIR="$share/licenses/${name}"
|
||||
install -d $out/{bin,lib/galera,share/doc/galera,$GALERA_LICENSE_DIR}
|
||||
|
||||
13
pkgs/servers/sql/mariadb/fix-c++11-narrowing-error.patch
Normal file
13
pkgs/servers/sql/mariadb/fix-c++11-narrowing-error.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/sql/table.cc b/sql/table.cc
|
||||
index e46af771507..9bef21a1da2 100644
|
||||
--- a/sql/table.cc
|
||||
+++ b/sql/table.cc
|
||||
@@ -8814,7 +8814,7 @@ bool TR_table::update(ulonglong start_id, ulonglong end_id)
|
||||
|
||||
store(FLD_BEGIN_TS, thd->transaction_time());
|
||||
thd->set_time();
|
||||
- timeval end_time= {thd->query_start(), long(thd->query_start_sec_part())};
|
||||
+ timeval end_time= {thd->query_start(), int(thd->query_start_sec_part())};
|
||||
store(FLD_TRX_ID, start_id);
|
||||
store(FLD_COMMIT_ID, end_id);
|
||||
store(FLD_COMMIT_TS, end_time);
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/libmariadb/mariadb_config/mariadb_config.c.in b/libmariadb/mariadb_config/mariadb_config.c.in
|
||||
index 45d2f4e..e5666db 100644
|
||||
--- a/libmariadb/mariadb_config/mariadb_config.c.in
|
||||
+++ b/libmariadb/mariadb_config/mariadb_config.c.in
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
static char *mariadb_progname;
|
||||
|
||||
-#define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@ -I@CMAKE_INSTALL_PREFIX@/@INSTALL_INCLUDEDIR@/mysql"
|
||||
+#define INCLUDE "-I@INSTALL_INCLUDEDIR@ -I@INSTALL_INCLUDEDIR@/mysql"
|
||||
#define LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadb @extra_dynamic_LDFLAGS@"
|
||||
#define LIBS_SYS "@extra_dynamic_LDFLAGS@"
|
||||
#define CFLAGS INCLUDE
|
||||
6
pkgs/servers/sql/mssql/jdbc/builder.sh
Normal file
6
pkgs/servers/sql/mssql/jdbc/builder.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
source $stdenv/setup
|
||||
|
||||
set -e
|
||||
|
||||
mkdir -p $out/share/java
|
||||
cp $src $out/share/java/mssql-jdbc.jar
|
||||
16
pkgs/servers/sql/mssql/jdbc/default.nix
Normal file
16
pkgs/servers/sql/mssql/jdbc/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mssql-jdbc";
|
||||
version = "7.2.2";
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/Microsoft/mssql-jdbc/releases/download/v${version}/${pname}-${version}.jre8.jar";
|
||||
sha256 = "09psxjy1v3khq8lcq6h9mbgyijsgawf0z2qryk1l91ypnwl8s3pg";
|
||||
};
|
||||
|
||||
meta = {
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
--- mysql-5.5.17/cmake/install_macros.cmake 2011-10-12 07:10:24.000000000 -0500
|
||||
+++ mysql-5.5.17/cmake/install_macros.cmake 2011-11-07 23:19:35.772837800 -0600
|
||||
@@ -230,7 +230,13 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
|
||||
IF(ARG_COMPONENT)
|
||||
SET(COMP COMPONENT ${ARG_COMPONENT})
|
||||
ENDIF()
|
||||
- INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||
+ IF(${ARG_DESTINATION} STREQUAL "${INSTALL_LIBDIR}")
|
||||
+ INSTALL(TARGETS ${TARGETS} LIBRARY DESTINATION ${ARG_DESTINATION}
|
||||
+ RUNTIME DESTINATION bin
|
||||
+ ARCHIVE DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||
+ ELSE()
|
||||
+ INSTALL(TARGETS ${TARGETS} DESTINATION ${ARG_DESTINATION} ${COMP})
|
||||
+ ENDIF()
|
||||
SET(INSTALL_LOCATION ${ARG_DESTINATION} )
|
||||
INSTALL_DEBUG_SYMBOLS("${TARGETS}")
|
||||
SET(INSTALL_LOCATION)
|
||||
--- mysql-5.5.17/libmysql/CMakeLists.txt 2011-10-12 07:10:24.000000000 -0500
|
||||
+++ mysql-5.5.17/libmysql/CMakeLists.txt 2011-11-08 03:19:31.379219300 -0600
|
||||
@@ -214,6 +214,7 @@ IF(NOT DISABLE_SHARED)
|
||||
SET_TARGET_PROPERTIES(mysqlclient PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
SET_TARGET_PROPERTIES(libmysql PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
|
||||
+ IF(NOT CYGWIN)
|
||||
# Install links to libmysqlclient.so (client_r)
|
||||
GET_VERSIONED_LIBNAME(
|
||||
"${CMAKE_SHARED_LIBRARY_PREFIX}mysqlclient_r"
|
||||
@@ -231,5 +232,6 @@ IF(NOT DISABLE_SHARED)
|
||||
linkname)
|
||||
INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
|
||||
ENDFOREACH()
|
||||
+ ENDIF(NOT CYGWIN)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
--- mysql-5.5.17/strings/dtoa.c 2011-10-12 07:10:25.000000000 -0500
|
||||
+++ mysql-5.5.17/strings/dtoa.c 2011-11-07 20:38:05.064690100 -0600
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
***************************************************************/
|
||||
|
||||
+#define __STRICT_ANSI__
|
||||
#include <my_base.h> /* for EOVERFLOW on Windows */
|
||||
#include <my_global.h>
|
||||
#include <m_string.h> /* for memcpy and NOT_FIXED_DEC */
|
||||
@@ -1,22 +0,0 @@
|
||||
--- mysql-5.5.17/libmysql/CMakeLists.txt 2011-10-12 07:10:24.000000000 -0500
|
||||
+++ mysql-5.5.17/libmysql/CMakeLists.txt 2011-11-08 03:19:31.379219300 -0600
|
||||
@@ -25,6 +25,11 @@ INCLUDE_DIRECTORIES(
|
||||
ADD_DEFINITIONS(${SSL_DEFINES})
|
||||
|
||||
SET(CLIENT_API_FUNCTIONS
|
||||
+dynstr_free
|
||||
+dynstr_append_mem
|
||||
+dynstr_append_os_quoted
|
||||
+dynstr_realloc
|
||||
+init_dynamic_string
|
||||
get_tty_password
|
||||
handle_options
|
||||
load_defaults
|
||||
@@ -131,6 +136,7 @@ mysql_server_end
|
||||
mysql_set_character_set
|
||||
mysql_get_character_set_info
|
||||
mysql_stmt_next_result
|
||||
+strfill
|
||||
|
||||
CACHE INTERNAL "Functions exported by client API"
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
{ stdenv, fetchurl, cmake, bison, ncurses, openssl, readline, zlib, perl
|
||||
, cctools, CoreServices }:
|
||||
|
||||
# Note: zlib is not required; MySQL can use an internal zlib.
|
||||
|
||||
let
|
||||
self = stdenv.mkDerivation rec {
|
||||
name = "mysql-${version}";
|
||||
version = "5.5.62";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://mysql/MySQL-5.5/${name}.tar.gz";
|
||||
sha256 = "1mwrzwk9ap09s430fpdkyhvx5j2syd3xj2hyfzvanjphq4xqbrxi";
|
||||
};
|
||||
|
||||
patches = if stdenv.isCygwin then [
|
||||
./5.5.17-cygwin.patch
|
||||
./5.5.17-export-symbols.patch
|
||||
] else null;
|
||||
|
||||
preConfigure = stdenv.lib.optional stdenv.isDarwin ''
|
||||
ln -s /bin/ps $TMPDIR/ps
|
||||
export PATH=$PATH:$TMPDIR
|
||||
'';
|
||||
|
||||
buildInputs = [ cmake bison ncurses openssl readline zlib ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ perl cctools CoreServices ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DWITH_SSL=yes"
|
||||
"-DWITH_READLINE=yes"
|
||||
"-DWITH_EMBEDDED_SERVER=yes"
|
||||
"-DWITH_ZLIB=yes"
|
||||
"-DHAVE_IPV6=yes"
|
||||
"-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
|
||||
"-DMYSQL_DATADIR=/var/lib/mysql"
|
||||
"-DINSTALL_SYSCONFDIR=etc/mysql"
|
||||
"-DINSTALL_INFODIR=share/mysql/docs"
|
||||
"-DINSTALL_MANDIR=share/man"
|
||||
"-DINSTALL_PLUGINDIR=lib/mysql/plugin"
|
||||
"-DINSTALL_SCRIPTDIR=bin"
|
||||
"-DINSTALL_INCLUDEDIR=include/mysql"
|
||||
"-DINSTALL_DOCREADMEDIR=share/mysql"
|
||||
"-DINSTALL_SUPPORTFILESDIR=share/mysql"
|
||||
"-DINSTALL_MYSQLSHAREDIR=share/mysql"
|
||||
"-DINSTALL_DOCDIR=share/mysql/docs"
|
||||
"-DINSTALL_SHAREDIR=share/mysql"
|
||||
"-DINSTALL_MYSQLTESTDIR="
|
||||
"-DINSTALL_SQLBENCHDIR="
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-fpermissive" ]; # since gcc-7
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";
|
||||
|
||||
prePatch = ''
|
||||
sed -i -e "s|/usr/bin/libtool|libtool|" cmake/libutils.cmake
|
||||
'';
|
||||
postInstall = ''
|
||||
sed -i -e "s|basedir=\"\"|basedir=\"$out\"|" $out/bin/mysql_install_db
|
||||
rm -r $out/data "$out"/lib/*.a
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
client = self;
|
||||
connector-c = self;
|
||||
server = self;
|
||||
mysqlVersion = "5.5";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://www.mysql.com/;
|
||||
description = "The world's most popular open source database";
|
||||
platforms = platforms.unix;
|
||||
# See https://downloads.mysql.com/docs/licenses/mysqld-5.5-gpl-en.pdf
|
||||
license = with licenses; [
|
||||
artistic1 bsd0 bsd2 bsd3 bsdOriginal
|
||||
gpl2 lgpl2 lgpl21 mit publicDomain licenses.zlib
|
||||
];
|
||||
broken = stdenv.isAarch64;
|
||||
};
|
||||
}; in self
|
||||
@@ -1,20 +0,0 @@
|
||||
diff -rc mysql-5.1.40/Makefile.in mysql-5.1.40-new/Makefile.in
|
||||
*** mysql-5.1.40/Makefile.in 2009-10-06 19:57:22.000000000 +0200
|
||||
--- mysql-5.1.40-new/Makefile.in 2009-12-16 13:07:16.060108763 +0100
|
||||
***************
|
||||
*** 891,897 ****
|
||||
--srcdir=$(top_srcdir)
|
||||
storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI
|
||||
|
||||
! all-local: @ABI_CHECK@
|
||||
|
||||
tags:
|
||||
support-files/build-tags
|
||||
--- 891,897 ----
|
||||
--srcdir=$(top_srcdir)
|
||||
storage/myisam/myisamchk --silent --fast $(distdir)/win/data/mysql/*.MYI
|
||||
|
||||
! all-local:
|
||||
|
||||
tags:
|
||||
support-files/build-tags
|
||||
@@ -38,7 +38,7 @@ let
|
||||
|
||||
enableParallelBuilding = !stdenv.isDarwin;
|
||||
|
||||
makeFlags = [ "world" ];
|
||||
buildFlags = [ "world" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ];
|
||||
|
||||
@@ -60,6 +60,7 @@ let
|
||||
(if atLeast "9.6" then ./patches/less-is-more-96.patch else ./patches/less-is-more.patch)
|
||||
(if atLeast "9.6" then ./patches/hardcode-pgxs-path-96.patch else ./patches/hardcode-pgxs-path.patch)
|
||||
./patches/specify_pkglibdir_at_runtime.patch
|
||||
./patches/findstring.patch
|
||||
] ++ lib.optional stdenv.isLinux ./patches/socketdir-in-run.patch;
|
||||
|
||||
installTargets = [ "install-world" ];
|
||||
@@ -101,6 +102,10 @@ let
|
||||
wrapProgram $out/bin/initdb --prefix PATH ":" ${glibc.bin}/bin
|
||||
'';
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
# autodetection doesn't seem to able to find this, but it's there.
|
||||
checkTarget = "check";
|
||||
|
||||
doInstallCheck = false; # needs a running daemon?
|
||||
|
||||
disallowedReferences = [ stdenv.cc ];
|
||||
@@ -157,41 +162,41 @@ let
|
||||
in self: {
|
||||
|
||||
postgresql_9_4 = self.callPackage generic {
|
||||
version = "9.4.21";
|
||||
version = "9.4.23";
|
||||
psqlSchema = "9.4";
|
||||
sha256 = "01k0s3a7qy8639zsjp1bjbfnnymyl0rgyylrjbkm81m0779b8j80";
|
||||
sha256 = "16qx4gfq7i2nnxm0i3zxpb3z1mmzx05a3fsh95414ay8n049q00d";
|
||||
this = self.postgresql_9_4;
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_9_5 = self.callPackage generic {
|
||||
version = "9.5.16";
|
||||
version = "9.5.18";
|
||||
psqlSchema = "9.5";
|
||||
sha256 = "0cg10ri0475vg1c8k1sb5qi4i64hiv9k7crmg15qvvnwsjanqmx4";
|
||||
sha256 = "1pgkz794wmp4f40843sbin49k5lgl59jvl6nazvdbb6mgr441jfz";
|
||||
this = self.postgresql_9_5;
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_9_6 = self.callPackage generic {
|
||||
version = "9.6.12";
|
||||
version = "9.6.14";
|
||||
psqlSchema = "9.6";
|
||||
sha256 = "114xay230xia2fagisxahs5fc2mza8hmmkr6ibd7nxllp938931f";
|
||||
sha256 = "08hsqczy1ixkjyf2vr3s9x69agfz9yr8lh31fir4z0dfr5jw421z";
|
||||
this = self.postgresql_9_6;
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_10 = self.callPackage generic {
|
||||
version = "10.7";
|
||||
version = "10.9";
|
||||
psqlSchema = "10.0"; # should be 10, but changing it is invasive
|
||||
sha256 = "1piyfcrcqscjhnnwn91kdvr764s7d0qz4lgygf9bl6qc71ji1vdz";
|
||||
sha256 = "0m0gbf7nwgag6a1z5f9xszwzgf2xhx0ncakyxwxlzs87n1zk32wm";
|
||||
this = self.postgresql_10;
|
||||
inherit self;
|
||||
};
|
||||
|
||||
postgresql_11 = self.callPackage generic {
|
||||
version = "11.2";
|
||||
version = "11.4";
|
||||
psqlSchema = "11.1"; # should be 11, but changing it is invasive
|
||||
sha256 = "01clq2lw0v83zh5dc89xdr3mmap0jr37kdkh401ph6f2177bjxi6";
|
||||
sha256 = "12ycjlqncijgmd5z078ybwda8ilas96lc7nxxmdq140mzpgjv002";
|
||||
this = self.postgresql_11;
|
||||
inherit self;
|
||||
};
|
||||
|
||||
@@ -18,15 +18,15 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/{lib,share/extension}
|
||||
|
||||
cp *.so $out/lib
|
||||
cp *.sql $out/share/extension
|
||||
cp *.control $out/share/extension
|
||||
cp *.sql $out/share/postgresql/extension
|
||||
cp *.control $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Columnar storage for PostgreSQL";
|
||||
homepage = https://www.citusdata.com/;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
platforms = platforms.linux;
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
||||
|
||||
33
pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix
Normal file
33
pkgs/servers/sql/postgresql/ext/pg_auto_failover.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ stdenv, fetchFromGitHub, postgresql, openssl }:
|
||||
|
||||
if stdenv.lib.versionOlder postgresql.version "10"
|
||||
then throw "pg_auto_failover not supported for PostgreSQL ${postgresql.version}"
|
||||
else
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pg_auto_failover";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "citusdata";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1296zk143y9fvmcg2hjbrjdjfhi5rrd0clh16vblkghcvxrzfyvy";
|
||||
};
|
||||
|
||||
buildInputs = [ postgresql openssl ];
|
||||
|
||||
installPhase = ''
|
||||
install -D -t $out/bin src/bin/pg_autoctl/pg_autoctl
|
||||
install -D -t $out/lib src/monitor/pgautofailover.so
|
||||
install -D -t $out/share/postgresql/extension src/monitor/*.sql
|
||||
install -D -t $out/share/postgresql/extension src/monitor/pgautofailover.control
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "PostgreSQL extension and service for automated failover and high-availability";
|
||||
homepage = "https://github.com/citusdata/pg_auto_failover";
|
||||
maintainers = [ maintainers.marsam ];
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.postgresql;
|
||||
};
|
||||
}
|
||||
32
pkgs/servers/sql/postgresql/ext/pg_bigm.nix
Normal file
32
pkgs/servers/sql/postgresql/ext/pg_bigm.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ stdenv, fetchurl, postgresql }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pg_bigm";
|
||||
version = "1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://osdn/pgbigm/66565/${pname}-${version}-20161011.tar.gz";
|
||||
sha256 = "1jp30za4bhwlas0yrhyjs9m03b1sj63km61xnvcbnh0sizyvhwis";
|
||||
};
|
||||
|
||||
buildInputs = [ postgresql ];
|
||||
|
||||
makeFlags = [ "USE_PGXS=1" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin # For buildEnv to setup proper symlinks. See #22653
|
||||
mkdir -p $out/{lib,share/extension}
|
||||
|
||||
cp *.so $out/lib
|
||||
cp *.sql $out/share/postgresql/extension
|
||||
cp *.control $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Text similarity measurement and index searching based on bigrams";
|
||||
homepage = "https://pgbigm.osdn.jp/";
|
||||
maintainers = [ maintainers.marsam ];
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.postgresql;
|
||||
};
|
||||
}
|
||||
@@ -17,8 +17,8 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/{lib,share/extension}
|
||||
|
||||
cp *.so $out/lib
|
||||
cp *.sql $out/share/extension
|
||||
cp *.control $out/share/extension
|
||||
cp *.sql $out/share/postgresql/extension
|
||||
cp *.control $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -17,15 +17,15 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/{lib,share/extension}
|
||||
|
||||
cp *.so $out/lib
|
||||
cp *.sql $out/share/extension
|
||||
cp *.control $out/share/extension
|
||||
cp *.sql $out/share/postgresql/extension
|
||||
cp *.control $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "HyperLogLog for PostgreSQL";
|
||||
homepage = https://www.citusdata.com/;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
platforms = platforms.linux;
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.asl20;
|
||||
};
|
||||
}
|
||||
|
||||
33
pkgs/servers/sql/postgresql/ext/pg_partman.nix
Normal file
33
pkgs/servers/sql/postgresql/ext/pg_partman.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ stdenv, fetchFromGitHub, postgresql }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pg_partman";
|
||||
version = "4.1.0";
|
||||
|
||||
buildInputs = [ postgresql ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pgpartman";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "0bzv92x492jcwzhal9x4vc3vszixscdpxc6yq5rrqld26dhmsp06";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin # For buildEnv to setup proper symlinks. See #22653
|
||||
mkdir -p $out/{lib,share/extension}
|
||||
|
||||
cp src/*.so $out/lib
|
||||
cp updates/* $out/share/postgresql/extension
|
||||
cp -r sql/* $out/share/postgresql/extension
|
||||
cp *.control $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Partition management extension for PostgreSQL";
|
||||
homepage = https://github.com/pgpartman/pg_partman;
|
||||
maintainers = with maintainers; [ ggpeti ];
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.postgresql;
|
||||
};
|
||||
}
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
installPhase = ''
|
||||
install -D bin/pg_repack -t $out/bin/
|
||||
install -D lib/pg_repack.so -t $out/lib/
|
||||
install -D lib/{pg_repack--${version}.sql,pg_repack.control} -t $out/share/extension
|
||||
install -D lib/{pg_repack--${version}.sql,pg_repack.control} -t $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
27
pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix
Normal file
27
pkgs/servers/sql/postgresql/ext/pg_safeupdate.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ stdenv, fetchFromGitHub, postgresql }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pg-safeupdate";
|
||||
version = "1.2";
|
||||
|
||||
buildInputs = [ postgresql ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "eradman";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "010m57jcv5v8pyfm1cqs3a306y750lvnvla9m5d98v5vdx3349jg";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin # for buildEnv, see https://github.com/NixOS/nixpkgs/issues/22653
|
||||
install -D safeupdate.so -t $out/lib
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A simple extension to PostgreSQL that requires criteria for UPDATE and DELETE";
|
||||
homepage = "https://github.com/eradman/pg-safeupdate";
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.postgresql;
|
||||
};
|
||||
}
|
||||
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
|
||||
buildPhase = "USE_PGXS=1 make";
|
||||
installPhase = ''
|
||||
install -D pg_similarity.so -t $out/lib/
|
||||
install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/extension
|
||||
install -D ./{pg_similarity--unpackaged--1.0.sql,pg_similarity--1.0.sql,pg_similarity.control} -t $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = {
|
||||
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
|
||||
is tightly integrated in the RDBMS in the sense that it defines operators so instead of the traditional
|
||||
operators (= and <>) you can use ~~~ and ~!~ (any of these operators represents a similarity function).
|
||||
'';
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = with lib.maintainers; [ danbst ];
|
||||
};
|
||||
|
||||
@@ -17,15 +17,15 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p $out/{lib,share/extension}
|
||||
|
||||
cp *.so $out/lib
|
||||
cp *.sql $out/share/extension
|
||||
cp *.control $out/share/extension
|
||||
cp *.sql $out/share/postgresql/extension
|
||||
cp *.control $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Efficient querying of 'top values' for PostgreSQL";
|
||||
homepage = https://github.com/citusdata/postgresql-topn;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
platforms = platforms.linux;
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.agpl3;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchFromGitHub, postgresql }:
|
||||
{ stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pgjwt-${version}";
|
||||
@@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildPhase = ":";
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/extension
|
||||
cp pg*sql *.control $out/share/extension
|
||||
mkdir -p $out/share/postgresql/extension
|
||||
cp pg*sql *.control $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{ stdenv, fetchurl, pkgconfig, postgresql, msgpack, groonga }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pgroonga-${version}";
|
||||
version = "2.1.8";
|
||||
pname = "pgroonga";
|
||||
version = "2.2.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://packages.groonga.org/source/pgroonga/${name}.tar.gz";
|
||||
sha256 = "0k3cxl58rdbs19sv27sk8yhk8ai8r046hyg9araxqiplrxx9y01s";
|
||||
url = "https://packages.groonga.org/source/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "1cankcprikx8nf72yg4h8542gqqlfgww6d63kg7l8l8sz962d28b";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
@@ -16,13 +16,18 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
install -D pgroonga.so -t $out/lib/
|
||||
install -D ./{pgroonga-*.sql,pgroonga.control} -t $out/share/extension
|
||||
install -D ./{pgroonga-*.sql,pgroonga.control} -t $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A PostgreSQL extension to use Groonga as the index";
|
||||
longDescription = "PGroonga is a PostgreSQL extension to use Groonga as the index. PostgreSQL supports full text search against languages that use only alphabet and digit. It means that PostgreSQL doesn't support full text search against Japanese, Chinese and so on. You can use super fast full text search feature against all languages by installing PGroonga into your PostgreSQL.";
|
||||
homepage = https://pgroonga.github.io/;
|
||||
longDescription = ''
|
||||
PGroonga is a PostgreSQL extension to use Groonga as the index.
|
||||
PostgreSQL supports full text search against languages that use only alphabet and digit.
|
||||
It means that PostgreSQL doesn't support full text search against Japanese, Chinese and so on.
|
||||
You can use super fast full text search feature against all languages by installing PGroonga into your PostgreSQL.
|
||||
'';
|
||||
homepage = "https://pgroonga.github.io/";
|
||||
license = licenses.postgresql;
|
||||
maintainers = with maintainers; [ DerTim1 ];
|
||||
};
|
||||
|
||||
@@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
install -D lib/*.so -t $out/lib
|
||||
install -D sql/pgrouting--${version}.sql -t $out/share/extension
|
||||
install -D sql/common/pgrouting.control -t $out/share/extension
|
||||
install -D sql/pgrouting--${version}.sql -t $out/share/postgresql/extension
|
||||
install -D sql/common/pgrouting.control -t $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ postgresql perl perlPackages.TAPParserSourceHandlerpgTAP which ];
|
||||
|
||||
installPhase = ''
|
||||
install -D {sql/pgtap--${version}.sql,pgtap.control} -t $out/share/extension
|
||||
install -D {sql/pgtap--${version}.sql,pgtap.control} -t $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
39
pkgs/servers/sql/postgresql/ext/pipelinedb.nix
Normal file
39
pkgs/servers/sql/postgresql/ext/pipelinedb.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ stdenv, fetchFromGitHub, postgresql, zeromq, openssl }:
|
||||
|
||||
if stdenv.lib.versionOlder postgresql.version "10"
|
||||
then throw "PipelineDB not supported for PostgreSQL ${postgresql.version}"
|
||||
else
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "pipelinedb";
|
||||
version = "1.0.0-13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pipelinedb";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1mnqpvx6g1r2n4kjrrx01vbdx7kvndfsbmm7zbzizjnjlyixz75f";
|
||||
};
|
||||
|
||||
buildInputs = [ postgresql openssl zeromq ];
|
||||
|
||||
makeFlags = [ "USE_PGXS=1" ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "/usr/lib/libzmq.a" "${zeromq}/lib/libzmq.a"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -D -t $out/lib/ pipelinedb.so
|
||||
install -D -t $out/share/postgresql/extension {pipelinedb-*.sql,pipelinedb.control}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "High-performance time-series aggregation for PostgreSQL";
|
||||
homepage = https://www.pipelinedb.com/;
|
||||
license = licenses.asl20;
|
||||
platforms = postgresql.meta.platforms;
|
||||
maintainers = [ maintainers.marsam ];
|
||||
};
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "plv8";
|
||||
version = "2.3.11";
|
||||
version = "2.3.12";
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
buildInputs = [ v8 postgresql ];
|
||||
@@ -11,25 +11,25 @@ stdenv.mkDerivation rec {
|
||||
owner = "plv8";
|
||||
repo = "plv8";
|
||||
rev = "v${version}";
|
||||
sha256 = "0bv2b8xxdqqhj6nwyc8kwhi5m5i7i1yl078sk3bnnc84b0mnza5x";
|
||||
sha256 = "1yi1ibiibvd0x4z5dm698w32ljrj3yr4j25jm1zkgkwd4ii8y644";
|
||||
};
|
||||
|
||||
makeFlags = [ "--makefile=Makefile.shared" ];
|
||||
makefile = "Makefile.shared";
|
||||
|
||||
buildFlags = [ "all" ];
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs ./generate_upgrade.sh
|
||||
'';
|
||||
|
||||
buildPhase = "make -f Makefile.shared all";
|
||||
|
||||
installPhase = ''
|
||||
install -D plv8*.so -t $out/lib
|
||||
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/extension
|
||||
install -D {plls,plcoffee,plv8}{--${version}.sql,.control} -t $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "PL/v8 - A Procedural Language in JavaScript powered by V8";
|
||||
homepage = https://pgxn.org/dist/plv8/;
|
||||
description = "V8 Engine Javascript Procedural Language add-on for PostgreSQL";
|
||||
homepage = "https://plv8.github.io/";
|
||||
maintainers = with maintainers; [ volth ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.postgresql;
|
||||
|
||||
@@ -31,9 +31,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preConfigure = ''
|
||||
sed -i 's@/usr/bin/file@${file}/bin/file@' configure
|
||||
configureFlags="--datadir=$out/share --datarootdir=$out/share --bindir=$out/bin --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev}"
|
||||
configureFlags="--datadir=$out/share/postgresql --datarootdir=$out/share/postgresql --bindir=$out/bin --with-gdalconfig=${gdal}/bin/gdal-config --with-jsondir=${json_c.dev}"
|
||||
|
||||
makeFlags="PERL=${perl}/bin/perl datadir=$out/share pkglibdir=$out/lib bindir=$out/bin"
|
||||
makeFlags="PERL=${perl}/bin/perl datadir=$out/share/postgresql pkglibdir=$out/lib bindir=$out/bin"
|
||||
'';
|
||||
postConfigure = ''
|
||||
sed -i "s|@mkdir -p \$(DESTDIR)\$(PGSQL_BINDIR)||g ;
|
||||
|
||||
@@ -15,15 +15,15 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
install -D tds_fdw.so -t $out/lib
|
||||
install -D sql/tds_fdw--${version}.sql -t $out/share/extension
|
||||
install -D tds_fdw.control -t $out/share/extension
|
||||
install -D sql/tds_fdw--${version}.sql -t $out/share/postgresql/extension
|
||||
install -D tds_fdw.control -t $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)";
|
||||
homepage = https://github.com/tds-fdw/tds_fdw;
|
||||
maintainers = [ maintainers.steve-chavez ];
|
||||
platforms = platforms.linux;
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.postgresql;
|
||||
};
|
||||
}
|
||||
|
||||
31
pkgs/servers/sql/postgresql/ext/temporal_tables.nix
Normal file
31
pkgs/servers/sql/postgresql/ext/temporal_tables.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ stdenv, fetchFromGitHub, postgresql }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "temporal_tables";
|
||||
version = "1.2.0";
|
||||
|
||||
buildInputs = [ postgresql ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mlt";
|
||||
repo = pname;
|
||||
rev = "6cc86eb03d618d6b9fc09ae523f1a1e5228d22b5";
|
||||
sha256 = "0ykv37rm511n5955mbh9dcp7pgg88z1nwgszav7z6pziaj3nba8x";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib,share/extension}
|
||||
|
||||
cp *.so $out/lib
|
||||
cp *.sql $out/share/postgresql/extension
|
||||
cp *.control $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Temporal Tables PostgreSQL Extension ";
|
||||
homepage = https://github.com/mlt/temporal_tables;
|
||||
maintainers = with maintainers; [ ggpeti ];
|
||||
platforms = postgresql.meta.platforms;
|
||||
license = licenses.bsd2;
|
||||
};
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "timescaledb-${version}";
|
||||
version = "1.2.2";
|
||||
version = "1.3.2";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ postgresql openssl ];
|
||||
@@ -17,15 +17,17 @@ stdenv.mkDerivation rec {
|
||||
owner = "timescale";
|
||||
repo = "timescaledb";
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "1fb1ab07jmgd1drinl25mbhwx966f75c7i7nh3ah0xf3cbk298xr";
|
||||
sha256 = "117az52h8isi15p47r5d6k5y80ng9vj3x8ljq39iavgr364q716c";
|
||||
};
|
||||
|
||||
cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" ];
|
||||
|
||||
# Fix the install phase which tries to install into the pgsql extension dir,
|
||||
# and cannot be manually overridden. This is rather fragile but works OK.
|
||||
patchPhase = ''
|
||||
for x in CMakeLists.txt sql/CMakeLists.txt; do
|
||||
substituteInPlace "$x" \
|
||||
--replace 'DESTINATION "''${PG_SHAREDIR}/extension"' "DESTINATION \"$out/share/extension\""
|
||||
--replace 'DESTINATION "''${PG_SHAREDIR}/extension"' "DESTINATION \"$out/share/postgresql/extension\""
|
||||
done
|
||||
|
||||
for x in src/CMakeLists.txt src/loader/CMakeLists.txt tsl/src/CMakeLists.txt; do
|
||||
|
||||
@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installPhase = ''
|
||||
install -D tsearch_extras.so -t $out/lib/
|
||||
install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/extension
|
||||
install -D ./{tsearch_extras--1.0.sql,tsearch_extras.control} -t $out/share/postgresql/extension
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
||||
@@ -7,6 +7,10 @@ self: super: {
|
||||
};
|
||||
};
|
||||
|
||||
pg_auto_failover = super.callPackage ./ext/pg_auto_failover.nix { };
|
||||
|
||||
pg_bigm = super.callPackage ./ext/pg_bigm.nix { };
|
||||
|
||||
pg_repack = super.callPackage ./ext/pg_repack.nix { };
|
||||
|
||||
pg_similarity = super.callPackage ./ext/pg_similarity.nix { };
|
||||
@@ -31,6 +35,10 @@ self: super: {
|
||||
|
||||
pgtap = super.callPackage ./ext/pgtap.nix { };
|
||||
|
||||
pipelinedb = super.callPackage ./ext/pipelinedb.nix { };
|
||||
|
||||
temporal_tables = super.callPackage ./ext/temporal_tables.nix { };
|
||||
|
||||
timescaledb = super.callPackage ./ext/timescaledb.nix { };
|
||||
|
||||
tsearch_extras = super.callPackage ./ext/tsearch_extras.nix { };
|
||||
@@ -38,4 +46,8 @@ self: super: {
|
||||
tds_fdw = super.callPackage ./ext/tds_fdw.nix { };
|
||||
|
||||
pgrouting = super.callPackage ./ext/pgrouting.nix { };
|
||||
|
||||
pg_partman = super.callPackage ./ext/pg_partman.nix { };
|
||||
|
||||
pg_safeupdate = super.callPackage ./ext/pg_safeupdate.nix { };
|
||||
}
|
||||
|
||||
59
pkgs/servers/sql/postgresql/patches/findstring.patch
Normal file
59
pkgs/servers/sql/postgresql/patches/findstring.patch
Normal file
@@ -0,0 +1,59 @@
|
||||
From: Matthew Bauer <mjbauer95@gmail.com>
|
||||
Date: Wed, 29 May 2019 22:51:52 -0400
|
||||
Subject: [PATCH] Add /postgresql suffix for Nix outputs
|
||||
|
||||
Nix outputs put the `name' in each store path like
|
||||
/nix/store/...-<name>. This was confusing the Postgres make script
|
||||
because it thought its data directory already had postgresql in its
|
||||
directory. This lead to Postgres installing all of its fils in
|
||||
$out/share. To fix this, we just look for postgres or psql in the part
|
||||
after the / using make's notdir.
|
||||
|
||||
---
|
||||
From: Matthew Bauer <mjbauer95@gmail.com>
|
||||
Date: Wed, 29 May 2019 22:51:52 -0400
|
||||
Subject: [PATCH] Add /postgresql suffix for Nix outputs
|
||||
|
||||
Nix outputs put the `name' in each store path like
|
||||
/nix/store/...-<name>. This was confusing the Postgres make script
|
||||
because it thought its data directory already had postgresql in its
|
||||
directory. This lead to Postgres installing all of its fils in
|
||||
$out/share. To fix this, we just look for postgres or psql in the part
|
||||
after the / using make's notdir.
|
||||
|
||||
---
|
||||
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
|
||||
index b9d86acaa9..bce05464c3 100644
|
||||
--- a/src/Makefile.global.in
|
||||
+++ b/src/Makefile.global.in
|
||||
@@ -102,15 +102,15 @@ datarootdir := @datarootdir@
|
||||
bindir := @bindir@
|
||||
|
||||
datadir := @datadir@
|
||||
-ifeq "$(findstring pgsql, $(datadir))" ""
|
||||
-ifeq "$(findstring postgres, $(datadir))" ""
|
||||
+ifeq "$(findstring pgsql, $(notdir $(datadir)))" ""
|
||||
+ifeq "$(findstring postgres, $(notdir $(datadir)))" ""
|
||||
override datadir := $(datadir)/postgresql
|
||||
endif
|
||||
endif
|
||||
|
||||
sysconfdir := @sysconfdir@
|
||||
-ifeq "$(findstring pgsql, $(sysconfdir))" ""
|
||||
-ifeq "$(findstring postgres, $(sysconfdir))" ""
|
||||
+ifeq "$(findstring pgsql, $(notdir $(sysconfdir)))" ""
|
||||
+ifeq "$(findstring postgres, $(notdir $(sysconfdir)))" ""
|
||||
override sysconfdir := $(sysconfdir)/postgresql
|
||||
endif
|
||||
endif
|
||||
@@ -136,8 +136,8 @@ endif
|
||||
mandir := @mandir@
|
||||
|
||||
docdir := @docdir@
|
||||
-ifeq "$(findstring pgsql, $(docdir))" ""
|
||||
-ifeq "$(findstring postgres, $(docdir))" ""
|
||||
+ifeq "$(findstring pgsql, $(notdir $(docdir)))" ""
|
||||
+ifeq "$(findstring postgres, $(notdir $(docdir)))" ""
|
||||
override docdir := $(docdir)/postgresql
|
||||
endif
|
||||
endif
|
||||
Reference in New Issue
Block a user