diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/sql')
30 files changed, 213 insertions, 134 deletions
diff --git a/nixpkgs/pkgs/servers/sql/dolt/default.nix b/nixpkgs/pkgs/servers/sql/dolt/default.nix index a947a2a9ea30..b95022dc7c13 100644 --- a/nixpkgs/pkgs/servers/sql/dolt/default.nix +++ b/nixpkgs/pkgs/servers/sql/dolt/default.nix @@ -2,18 +2,18 @@ buildGoModule rec { pname = "dolt"; - version = "1.35.11"; + version = "1.38.0"; src = fetchFromGitHub { owner = "dolthub"; repo = "dolt"; rev = "v${version}"; - sha256 = "sha256-nOS6Gj6id9s03iEhhhj99v3t38i/AoFO72swi30fflw="; + sha256 = "sha256-R3BrF2563jN7rQbF0Edh9clgHh91inmDLHuEFiowrVI="; }; modRoot = "./go"; subPackages = [ "cmd/dolt" ]; - vendorHash = "sha256-tNnfHyqBN49Z/F4Z68JfSa860uo0i2gAkKv2IDoONr4="; + vendorHash = "sha256-QyiWmVqa+eqUvMTC2swM9Rumhn4Me+FA+FGnJGElKDA="; proxyVendor = true; doCheck = false; diff --git a/nixpkgs/pkgs/servers/sql/materialize/default.nix b/nixpkgs/pkgs/servers/sql/materialize/default.nix index 90297cfa81ae..d31433db7f1f 100644 --- a/nixpkgs/pkgs/servers/sql/materialize/default.nix +++ b/nixpkgs/pkgs/servers/sql/materialize/default.nix @@ -70,7 +70,6 @@ rustPlatform.buildRustPackage rec { # needed for internal protobuf c wrapper library env.PROTOC = "${protobuf}/bin/protoc"; env.PROTOC_INCLUDE = "${protobuf}/include"; - env.LIBCLANG_PATH = "${libclang.lib}/lib"; # needed to dynamically link rdkafka env.CARGO_FEATURE_DYNAMIC_LINKING=1; diff --git a/nixpkgs/pkgs/servers/sql/monetdb/default.nix b/nixpkgs/pkgs/servers/sql/monetdb/default.nix index f98e507ed4c4..654797c840c0 100644 --- a/nixpkgs/pkgs/servers/sql/monetdb/default.nix +++ b/nixpkgs/pkgs/servers/sql/monetdb/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "monetdb"; - version = "11.49.7"; + version = "11.49.9"; src = fetchurl { url = "https://dev.monetdb.org/downloads/sources/archive/MonetDB-${finalAttrs.version}.tar.bz2"; - hash = "sha256-Z9GHyNzwIJZd/1eXjUT4+Tb1kZveAWHe6wEMXem/0Kw="; + hash = "sha256-dN4Me9VTLHzJHIiHP2mMy84I6nCycP2nYgb/J36rJnU="; }; nativeBuildInputs = [ bison cmake python3 ]; diff --git a/nixpkgs/pkgs/servers/sql/patroni/default.nix b/nixpkgs/pkgs/servers/sql/patroni/default.nix index 23c165ab545f..abf1ecbac053 100644 --- a/nixpkgs/pkgs/servers/sql/patroni/default.nix +++ b/nixpkgs/pkgs/servers/sql/patroni/default.nix @@ -6,24 +6,17 @@ pythonPackages.buildPythonApplication rec { pname = "patroni"; - version = "2.1.3"; + version = "3.3.0"; src = fetchFromGitHub { owner = "zalando"; repo = pname; rev = "v${version}"; - sha256 = "sha256-cBkiBrty/6A3rIv9A1oh8GvPjwxhHwYEKuDIsNzHw1g="; + sha256 = "sha256-gOjjE++hf3GOimvCxBR0jqqi3JNpbejLcWbLHpz2H4Q="; }; - # cdiff renamed to ydiff; remove when patroni source reflects this. - postPatch = '' - for i in requirements.txt patroni/ctl.py tests/test_ctl.py; do - substituteInPlace $i --replace cdiff ydiff - done - ''; - propagatedBuildInputs = with pythonPackages; [ - boto + boto3 click consul dnspython diff --git a/nixpkgs/pkgs/servers/sql/percona-server/default.nix b/nixpkgs/pkgs/servers/sql/percona-server/default.nix new file mode 100644 index 000000000000..8cab6ec656a2 --- /dev/null +++ b/nixpkgs/pkgs/servers/sql/percona-server/default.nix @@ -0,0 +1,15 @@ +pkgs: { + percona-server_lts = pkgs.callPackage ./lts.nix { + inherit (pkgs.darwin) cctools developer_cmds DarwinTools; + inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices; + boost = pkgs.boost177; # Configure checks for specific version. + icu = pkgs.icu69; + protobuf = pkgs.protobuf_21; + }; + percona-server_innovation = pkgs.callPackage ./innovation.nix { + inherit (pkgs.darwin) cctools developer_cmds DarwinTools; + inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices; + # newer versions cause linking failures against `libabsl_spinlock_wait` + protobuf = pkgs.protobuf_21; + }; +} diff --git a/nixpkgs/pkgs/servers/sql/percona-server/innovation.nix b/nixpkgs/pkgs/servers/sql/percona-server/innovation.nix new file mode 100644 index 000000000000..d19c17554226 --- /dev/null +++ b/nixpkgs/pkgs/servers/sql/percona-server/innovation.nix @@ -0,0 +1,112 @@ +{ lib, stdenv, fetchurl, bison, cmake, pkg-config +, boost, icu, libedit, libevent, lz4, ncurses, openssl, perl, protobuf, re2, readline, zlib, zstd, libfido2 +, numactl, cctools, CoreServices, developer_cmds, libtirpc, rpcsvc-proto, curl, DarwinTools, nixosTests +, systemd +# Percona-specific deps +, coreutils, cyrus_sasl, gnumake, openldap +# optional: different malloc implementations +, withJemalloc ? false, withTcmalloc ? false, jemalloc, gperftools +}: + +assert !(withJemalloc && withTcmalloc); + + +stdenv.mkDerivation (finalAttrs: { + pname = "percona-server_innovation"; + version = "8.3.0-1"; + + src = fetchurl { + url = "https://downloads.percona.com/downloads/percona-distribution-mysql-ps/percona-distribution-mysql-ps-${builtins.head (lib.strings.split "-" finalAttrs.version)}/source/tarball/percona-server-${finalAttrs.version}.tar.gz"; + hash = "sha256-GeuifzqCkStmb4qYa8147XBHvMogYwfsn0FyHdO4WEg"; + }; + + nativeBuildInputs = [ bison cmake pkg-config ] + ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ]; + + patches = [ + ./no-force-outline-atomics.patch # Do not force compilers to turn on -moutline-atomics switch + ]; + + ## NOTE: MySQL upstream frequently twiddles the invocations of libtool. When updating, you might proactively grep for libtool references. + postPatch = '' + substituteInPlace cmake/libutils.cmake --replace /usr/bin/libtool libtool + substituteInPlace cmake/os/Darwin.cmake --replace /usr/bin/libtool libtool + # The rocksdb setup script is called with `env -i` and cannot find anything in PATH. + patchShebangs storage/rocksdb/get_rocksdb_files.sh + substituteInPlace storage/rocksdb/get_rocksdb_files.sh --replace mktemp ${coreutils}/bin/mktemp + substituteInPlace storage/rocksdb/get_rocksdb_files.sh --replace "rm $MKFILE" "${coreutils}/bin/rm $MKFILE" + substituteInPlace storage/rocksdb/get_rocksdb_files.sh --replace "make --" "${gnumake}/bin/make --" + ''; + + buildInputs = [ + boost (curl.override { inherit openssl; }) icu libedit libevent lz4 ncurses openssl protobuf re2 readline zlib + zstd libfido2 openldap perl cyrus_sasl + ] ++ lib.optionals stdenv.isLinux [ + numactl libtirpc systemd + ] ++ lib.optionals stdenv.isDarwin [ + cctools CoreServices developer_cmds DarwinTools + ] + ++ lib.optional (stdenv.isLinux && withJemalloc) jemalloc + ++ lib.optional (stdenv.isLinux && withTcmalloc) gperftools; + + outputs = [ "out" "static" ]; + + cmakeFlags = [ + # Percona-specific flags. + "-DPORTABLE=1" + "-DWITH_LDAP=system" + "-DROCKSDB_DISABLE_AVX2=1" + "-DROCKSDB_DISABLE_MARCH_NATIVE=1" + + # Flags taken from mysql package. + "-DFORCE_UNSUPPORTED_COMPILER=1" # To configure on Darwin. + "-DWITH_ROUTER=OFF" # It may be packaged separately. + "-DWITH_SYSTEM_LIBS=ON" + "-DWITH_UNIT_TESTS=OFF" + "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" + "-DMYSQL_DATADIR=/var/lib/mysql" + "-DINSTALL_INFODIR=share/mysql/docs" + "-DINSTALL_MANDIR=share/man" + "-DINSTALL_PLUGINDIR=lib/mysql/plugin" + "-DINSTALL_INCLUDEDIR=include/mysql" + "-DINSTALL_DOCREADMEDIR=share/mysql" + "-DINSTALL_SUPPORTFILESDIR=share/mysql" + "-DINSTALL_MYSQLSHAREDIR=share/mysql" + "-DINSTALL_MYSQLTESTDIR=" + "-DINSTALL_DOCDIR=share/mysql/docs" + "-DINSTALL_SHAREDIR=share/mysql" + + + ] ++ lib.optionals stdenv.isLinux [ + "-DWITH_SYSTEMD=1" + "-DWITH_SYSTEMD_DEBUG=1" + ] + ++ lib.optional (stdenv.isLinux && withJemalloc) "-DWITH_JEMALLOC=1" + ++ lib.optional (stdenv.isLinux && withTcmalloc) "-DWITH_TCMALLOC=1"; + + postInstall = '' + moveToOutput "lib/*.a" $static + so=${stdenv.hostPlatform.extensions.sharedLibrary} + ln -s libmysqlclient$so $out/lib/libmysqlclient_r$so + ''; + + passthru = { + client = finalAttrs.finalPackage; + connector-c = finalAttrs.finalPackage; + server = finalAttrs.finalPackage; + mysqlVersion = lib.versions.majorMinor finalAttrs.version; + tests = nixosTests.mysql.percona-server_innovation; + }; + + + meta = with lib; { + homepage = "https://www.percona.com/software/mysql-database/percona-server"; + description = '' + A free, fully compatible, enhanced, open source drop-in replacement for + MySQL® that provides superior performance, scalability and instrumentation. + ''; + license = licenses.gpl2; + maintainers = teams.flyingcircus.members; + platforms = platforms.unix; + }; +}) diff --git a/nixpkgs/pkgs/servers/sql/percona-server/8.0.x.nix b/nixpkgs/pkgs/servers/sql/percona-server/lts.nix index a2f4dd1c04e0..f8b13aa4180a 100644 --- a/nixpkgs/pkgs/servers/sql/percona-server/8.0.x.nix +++ b/nixpkgs/pkgs/servers/sql/percona-server/lts.nix @@ -6,7 +6,7 @@ }: stdenv.mkDerivation (finalAttrs: { - pname = "percona-server"; + pname = "percona-server_lts"; version = "8.0.36-28"; src = fetchurl { @@ -80,7 +80,7 @@ stdenv.mkDerivation (finalAttrs: { connector-c = finalAttrs.finalPackage; server = finalAttrs.finalPackage; mysqlVersion = lib.versions.majorMinor finalAttrs.version; - tests = nixosTests.mysql.percona-server_8_0; + tests = nixosTests.mysql.percona-server_lts; }; meta = with lib; { diff --git a/nixpkgs/pkgs/servers/sql/postgresql/12.nix b/nixpkgs/pkgs/servers/sql/postgresql/12.nix index 9e0388be0451..d29fc7683048 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/12.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/12.nix @@ -1,10 +1,4 @@ import ./generic.nix { version = "12.18"; hash = "sha256-T5kZcl2UHOmGjgf+HtHTqGdIWZtIM4ZUdYOSi3TDkYo="; - muslPatches = { - icu-collations-hack = { - url = "https://git.alpinelinux.org/aports/plain/testing/postgresql12/icu-collations-hack.patch?id=d5227c91adda59d4e7f55f13468f0314e8869174"; - hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; - }; - }; } diff --git a/nixpkgs/pkgs/servers/sql/postgresql/13.nix b/nixpkgs/pkgs/servers/sql/postgresql/13.nix index a4870812acdb..c81e15bc7f68 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/13.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/13.nix @@ -2,10 +2,6 @@ import ./generic.nix { version = "13.14"; hash = "sha256-uN8HhVGJiWC9UA3F04oXfpkFN234H+fytmChQH+mpe0="; muslPatches = { - icu-collations-hack = { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/icu-collations-hack.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; - hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; - }; disable-test-collate-icu-utf8 = { url = "https://git.alpinelinux.org/aports/plain/main/postgresql13/disable-test-collate.icu.utf8.patch?id=69faa146ec9fff3b981511068f17f9e629d4688b"; hash = "sha256-jS/qxezaiaKhkWeMCXwpz1SDJwUWn9tzN0uKaZ3Ph2Y="; diff --git a/nixpkgs/pkgs/servers/sql/postgresql/14.nix b/nixpkgs/pkgs/servers/sql/postgresql/14.nix index 2de876cf4ad6..c96ddd3ddc80 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/14.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/14.nix @@ -2,10 +2,6 @@ import ./generic.nix { version = "14.11"; hash = "sha256-pnC9fc4i3K1Cl7JhE2s7HUoJpvVBcZViqhTKY78paKg="; muslPatches = { - icu-collations-hack = { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/icu-collations-hack.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; - hash = "sha256-wuwjvGHArkRNwFo40g3p43W32OrJohretlt6iSRlJKg="; - }; disable-test-collate-icu-utf8 = { url = "https://git.alpinelinux.org/aports/plain/main/postgresql14/disable-test-collate.icu.utf8.patch?id=56999e6d0265ceff5c5239f85fdd33e146f06cb7"; hash = "sha256-jXe23AxnFjEl+TZQm4R7rStk2Leo08ctxMNmu1xr5zM="; diff --git a/nixpkgs/pkgs/servers/sql/postgresql/15.nix b/nixpkgs/pkgs/servers/sql/postgresql/15.nix index f633dc975085..00dfc0cbbc19 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/15.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/15.nix @@ -1,10 +1,4 @@ import ./generic.nix { version = "15.6"; hash = "sha256-hFUUbtnGnJOlfelUrq0DAsr60DXCskIXXWqh4X68svs="; - muslPatches = { - icu-collations-hack = { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql15/icu-collations-hack.patch?id=f424e934e6d076c4ae065ce45e734aa283eecb9c"; - hash = "sha256-HgtmhF4OJYU9macGJbTB9PjQi/yW7c3Akm3U0niWs8I="; - }; - }; } diff --git a/nixpkgs/pkgs/servers/sql/postgresql/16.nix b/nixpkgs/pkgs/servers/sql/postgresql/16.nix index 6a6420643b31..cdc37b7c62f5 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/16.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/16.nix @@ -1,10 +1,4 @@ import ./generic.nix { version = "16.2"; hash = "sha256-RG6IKU28LJCFq0twYaZG+mBLS+wDUh1epnHC5a2bKVI="; - muslPatches = { - icu-collations-hack = { - url = "https://git.alpinelinux.org/aports/plain/main/postgresql16/icu-collations-hack.patch?id=08a24be262339fd093e641860680944c3590238e"; - hash = "sha256-+urQdVIlADLdDPeT68XYv5rljhbK8M/7mPZn/cF+FT0="; - }; - }; } diff --git a/nixpkgs/pkgs/servers/sql/postgresql/default.nix b/nixpkgs/pkgs/servers/sql/postgresql/default.nix index d11a2d06b2d2..ff9f4f4150a2 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/default.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/default.nix @@ -15,7 +15,6 @@ let in self.lib.nameValuePair attrName (import path { inherit jitSupport self; - thisAttr = attrName; }) ) versions; diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/pg_libversion.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/pg_libversion.nix index 9d4d46a769b4..b5c3ad6acab8 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/ext/pg_libversion.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/pg_libversion.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, gitUpdater , pkg-config , postgresql , libversion @@ -8,13 +9,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "pg_libversion"; - version = "2.0.0"; + version = "2.0.1"; src = fetchFromGitHub { owner = "repology"; repo = "postgresql-libversion"; rev = finalAttrs.version; - hash = "sha256-60HX/Y+6QIzqmDnjNpgO4GCbDhNfeek9myMWoYLdrAA="; + hash = "sha256-3nqXaBwPRUSo6wUY5YMjJ/nFFKmhgP1zFKapD+RqSDw="; }; nativeBuildInputs = [ @@ -36,6 +37,8 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; + passthru.updateScript = gitUpdater { }; + meta = with lib; { description = "PostgreSQL extension with support for version string comparison"; homepage = "https://github.com/repology/postgresql-libversion"; diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/pgjwt.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/pgjwt.nix index 2b6ee2edaf85..7134c052363d 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/ext/pgjwt.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/pgjwt.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation { pname = "pgjwt"; - version = "unstable-2023-03-02"; + version = "0-unstable-2023-03-02"; src = fetchFromGitHub { owner = "michelp"; diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix index d6a4f24bf5e6..9cbf6ae442e4 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/pgvecto-rs/default.nix @@ -2,7 +2,6 @@ , buildPgrxExtension , cargo-pgrx_0_11_2 , clang_16 -, fetchCrate , fetchFromGitHub , nix-update-script , nixosTests @@ -93,7 +92,9 @@ in meta = with lib; { # The pgrx 0.11.2 dependency is broken in aarch64-linux: https://github.com/pgcentralfoundation/pgrx/issues/1429 # It is fixed in pgrx 0.11.3, but upstream is still using pgrx 0.11.2 - broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; + # Additionally, upstream (accidentally) broke support for PostgreSQL 12 and 13 on 0.2.1, but + # they are removing it in 0.3.0 either way: https://github.com/tensorchord/pgvecto.rs/issues/343 + broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin || (versionOlder postgresql.version "14"); description = "Scalable, Low-latency and Hybrid-enabled Vector Search in Postgres"; homepage = "https://github.com/tensorchord/pgvecto.rs"; license = licenses.asl20; diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/tds_fdw.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/tds_fdw.nix index 9986f2131f30..86ab520944e7 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/ext/tds_fdw.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/tds_fdw.nix @@ -3,7 +3,7 @@ stdenv.mkDerivation rec { pname = "tds_fdw"; # Move to stable version when it's released. - version = "unstable-2024-02-10"; + version = "2.0.3-unstable-2024-02-10"; buildInputs = [ postgresql freetds ]; @@ -21,7 +21,9 @@ stdenv.mkDerivation rec { install -D tds_fdw.control -t $out/share/postgresql/extension ''; - passthru.updateScript = unstableGitUpdater { }; + passthru.updateScript = unstableGitUpdater { + tagPrefix = "v"; + }; meta = with lib; { description = "A PostgreSQL foreign data wrapper to connect to TDS databases (Sybase and Microsoft SQL Server)"; diff --git a/nixpkgs/pkgs/servers/sql/postgresql/generic.nix b/nixpkgs/pkgs/servers/sql/postgresql/generic.nix index 302350edeb5e..705407a93256 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/generic.nix +++ b/nixpkgs/pkgs/servers/sql/postgresql/generic.nix @@ -16,10 +16,10 @@ let , self, newScope, buildEnv # source specification - , version, hash, muslPatches + , version, hash, muslPatches ? {} # for tests - , testers, nixosTests, thisAttr + , testers, nixosTests # JIT , jitSupport @@ -45,7 +45,8 @@ let stdenv' = if jitSupport then llvmPackages.stdenv else stdenv; in stdenv'.mkDerivation (finalAttrs: { - inherit pname version; + inherit version; + pname = pname + lib.optionalString jitSupport "-jit"; src = fetchurl { url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2"; @@ -80,16 +81,15 @@ let ] ++ lib.optionals jitSupport [ llvmPackages.llvm.dev nukeReferences patchelf ]; - enableParallelBuilding = !stdenv'.isDarwin; + enableParallelBuilding = true; separateDebugInfo = true; buildFlags = [ "world" ]; - env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2"; - - # Otherwise it retains a reference to compiler and fails; see #44767. TODO: better. - preConfigure = "CC=${stdenv'.cc.targetPrefix}cc"; + # Makes cross-compiling work when xml2-config can't be executed on the host. + # Fixed upstream in https://github.com/postgres/postgres/commit/0bc8cebdb889368abdf224aeac8bc197fe4c9ae6 + env.NIX_CFLAGS_COMPILE = lib.optionalString (olderThan "13") "-I${libxml2.dev}/include/libxml2"; configureFlags = [ "--with-openssl" @@ -109,12 +109,11 @@ let ++ lib.optionals stdenv'.isLinux [ "--with-pam" ]; patches = [ - (if atLeast "16" then ./patches/disable-normalize_exec_path.patch - else ./patches/disable-resolve_symlinks.patch) + (if atLeast "16" then ./patches/relative-to-symlinks-16+.patch else ./patches/relative-to-symlinks.patch) ./patches/less-is-more.patch - ./patches/hardcode-pgxs-path.patch + ./patches/paths-for-split-outputs.patch ./patches/specify_pkglibdir_at_runtime.patch - ./patches/findstring.patch + ./patches/paths-with-postgresql-suffix.patch (substituteAll { src = ./patches/locale-binary-path.patch; @@ -125,16 +124,14 @@ let # Using fetchurl instead of fetchpatch on purpose: https://github.com/NixOS/nixpkgs/issues/240141 map fetchurl (lib.attrValues muslPatches) ) ++ lib.optionals stdenv'.isLinux [ - (if atLeast "13" then ./patches/socketdir-in-run-13.patch else ./patches/socketdir-in-run.patch) + (if atLeast "13" then ./patches/socketdir-in-run-13+.patch else ./patches/socketdir-in-run.patch) ]; installTargets = [ "install-world" ]; - LC_ALL = "C"; - postPatch = '' # Hardcode the path to pgxs so pg_config returns the path in $out - substituteInPlace "src/common/config_info.c" --replace HARDCODED_PGXS_PATH "$out/lib" + substituteInPlace "src/common/config_info.c" --subst-var out '' + lib.optionalString jitSupport '' # Force lookup of jit stuff in $out instead of $lib substituteInPlace src/backend/jit/jit.c --replace pkglib_path \"$out/lib\" @@ -201,6 +198,7 @@ let # autodetection doesn't seem to able to find this, but it's there. checkTarget = "check"; + # TODO: Remove after the next set of minor releases on May 9th 2024 preCheck = # On musl, comment skip the following tests, because they break due to # ! ERROR: could not load library "/build/postgresql-11.5/tmp_install/nix/store/...-postgresql-11.5-lib/lib/libpqwalreceiver.so": Error loading shared library libpq.so.5: No such file or directory (needed by /build/postgresql-11.5/tmp_install/nix/store/...-postgresql-11.5-lib/lib/libpqwalreceiver.so) @@ -246,10 +244,18 @@ let this.pkgs; tests = { - postgresql = nixosTests.postgresql-wal-receiver.${thisAttr}; + postgresql-wal-receiver = import ../../../../nixos/tests/postgresql-wal-receiver.nix { + inherit (stdenv) system; + pkgs = self; + package = this; + }; pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; } // lib.optionalAttrs jitSupport { - postgresql-jit = nixosTests.postgresql-jit.${thisAttr}; + postgresql-jit = import ../../../../nixos/tests/postgresql-jit.nix { + inherit (stdenv) system; + pkgs = self; + package = this; + }; }; }; @@ -272,7 +278,9 @@ let # resulting LLVM IR isn't platform-independent this doesn't give you much. # In fact, I tried to test the result in a VM-test, but as soon as JIT was used to optimize # a query, postgres would coredump with `Illegal instruction`. - broken = jitSupport && (stdenv.hostPlatform != stdenv.buildPlatform); + broken = (jitSupport && stdenv.hostPlatform != stdenv.buildPlatform) + # Allmost all tests fail FATAL errors for v12 and v13 + || (jitSupport && stdenv.hostPlatform.isMusl && olderThan "14"); }; }); diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/disable-resolve_symlinks.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/disable-resolve_symlinks.patch deleted file mode 100644 index fadeea90ac4b..000000000000 --- a/nixpkgs/pkgs/servers/sql/postgresql/patches/disable-resolve_symlinks.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/src/common/exec.c 2014-09-04 20:19:12.236057588 +0200 -+++ b/src/common/exec.c 2014-09-04 20:19:50.550251633 +0200 -@@ -218,6 +218,9 @@ - static int - resolve_symlinks(char *path) - { -+ // On NixOS we *want* stuff relative to symlinks. -+ return 0; -+ - #ifdef HAVE_READLINK - struct stat buf; - char orig_wd[MAXPGPATH], diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path.patch deleted file mode 100644 index 6cd449769baa..000000000000 --- a/nixpkgs/pkgs/servers/sql/postgresql/patches/hardcode-pgxs-path.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Naur postgresql-9.6.1-orig/src/common/config_info.c postgresql-9.6.1/src/common/config_info.c ---- postgresql-9.6.1-orig/src/common/config_info.c 2016-11-22 21:39:29.231929261 +0100 -+++ postgresql-9.6.1/src/common/config_info.c 2016-11-22 23:36:53.685163543 +0100 -@@ -118,7 +118,10 @@ - i++; - - configdata[i].name = pstrdup("PGXS"); -+ strlcpy(path, "HARDCODED_PGXS_PATH", sizeof(path)); -+/* commented out to be able to point to nix $out path - get_pkglib_path(my_exec_path, path); -+*/ - strlcat(path, "/pgxs/src/makefiles/pgxs.mk", sizeof(path)); - cleanup_path(path); - configdata[i].setting = pstrdup(path); diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/less-is-more.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/less-is-more.patch index f14af9dc2207..a72d1a28f9ce 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/patches/less-is-more.patch +++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/less-is-more.patch @@ -1,6 +1,5 @@ -diff -Naur postgresql-9.6.1-orig/src/include/fe_utils/print.h postgresql-9.6.1/src/include/fe_utils/print.h ---- postgresql-9.6.1-orig/src/include/fe_utils/print.h 2016-11-22 21:39:29.148932827 +0100 -+++ postgresql-9.6.1/src/include/fe_utils/print.h 2016-11-22 21:39:36.283626258 +0100 +--- a/src/include/fe_utils/print.h ++++ b/src/include/fe_utils/print.h @@ -18,7 +18,7 @@ /* This is not a particularly great place for this ... */ diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/locale-binary-path.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/locale-binary-path.patch index 08e90bce750c..8068683ab64b 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/patches/locale-binary-path.patch +++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/locale-binary-path.patch @@ -1,5 +1,3 @@ -diff --git a/src/backend/commands/collationcmds.c b/src/backend/commands/collationcmds.c -index fcfc02d..d011394 100644 --- a/src/backend/commands/collationcmds.c +++ b/src/backend/commands/collationcmds.c @@ -611,7 +611,7 @@ pg_import_system_collations(PG_FUNCTION_ARGS) diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/paths-for-split-outputs.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/paths-for-split-outputs.patch new file mode 100644 index 000000000000..2134f7e81a87 --- /dev/null +++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/paths-for-split-outputs.patch @@ -0,0 +1,11 @@ +--- a/src/common/config_info.c ++++ b/src/common/config_info.c +@@ -118,7 +118,7 @@ + i++; + + configdata[i].name = pstrdup("PGXS"); ++ strlcpy(path, "@out@/lib", sizeof(path)); +- get_pkglib_path(my_exec_path, path); + strlcat(path, "/pgxs/src/makefiles/pgxs.mk", sizeof(path)); + cleanup_path(path); + configdata[i].setting = pstrdup(path); diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/findstring.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/paths-with-postgresql-suffix.patch index 959bf6a6caa4..04d2f556e0bf 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/patches/findstring.patch +++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/paths-with-postgresql-suffix.patch @@ -1,19 +1,3 @@ -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 @@ -22,8 +6,6 @@ $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@ diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/disable-normalize_exec_path.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/relative-to-symlinks-16+.patch index 349fd4203348..996072ebd2fb 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/patches/disable-normalize_exec_path.patch +++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/relative-to-symlinks-16+.patch @@ -1,10 +1,11 @@ +On NixOS we *want* stuff relative to symlinks. +--- --- a/src/common/exec.c +++ b/src/common/exec.c -@@ -238,6 +238,9 @@ +@@ -238,6 +238,8 @@ static int normalize_exec_path(char *path) { -+ // On NixOS we *want* stuff relative to symlinks. + return 0; + /* diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/relative-to-symlinks.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/relative-to-symlinks.patch new file mode 100644 index 000000000000..c9b199baf960 --- /dev/null +++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/relative-to-symlinks.patch @@ -0,0 +1,13 @@ +On NixOS we *want* stuff relative to symlinks. +--- +--- a/src/common/exec.c ++++ b/src/common/exec.c +@@ -218,6 +218,8 @@ + static int + resolve_symlinks(char *path) + { ++ return 0; ++ + #ifdef HAVE_READLINK + struct stat buf; + char orig_wd[MAXPGPATH], diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run-13.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run-13+.patch index 72c778b0758e..fd808b609824 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run-13.patch +++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run-13+.patch @@ -1,7 +1,5 @@ -diff --git i/src/include/pg_config_manual.h w/src/include/pg_config_manual.h -index 8f3ec6bde1..4fc01e4a0a 100644 ---- i/src/include/pg_config_manual.h -+++ w/src/include/pg_config_manual.h +--- a/src/include/pg_config_manual.h ++++ b/src/include/pg_config_manual.h @@ -201,7 +201,7 @@ * support them yet. */ diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch index 969f80ff8fc7..4932ef69ee36 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch +++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/socketdir-in-run.patch @@ -1,5 +1,3 @@ -diff --git a/src/include/pg_config_manual.h b/src/include/pg_config_manual.h -index 743401cb96..be5c5f61d2 100644 --- a/src/include/pg_config_manual.h +++ b/src/include/pg_config_manual.h @@ -179,7 +179,7 @@ diff --git a/nixpkgs/pkgs/servers/sql/postgresql/patches/specify_pkglibdir_at_runtime.patch b/nixpkgs/pkgs/servers/sql/postgresql/patches/specify_pkglibdir_at_runtime.patch index fe95d2ee99f0..b94fc9efcbff 100644 --- a/nixpkgs/pkgs/servers/sql/postgresql/patches/specify_pkglibdir_at_runtime.patch +++ b/nixpkgs/pkgs/servers/sql/postgresql/patches/specify_pkglibdir_at_runtime.patch @@ -1,6 +1,5 @@ -diff -ur postgresql-9.5.3-orig/src/port/path.c postgresql-9.5.3/src/port/path.c ---- postgresql-9.5.3-orig/src/port/path.c 2016-05-09 22:50:23.000000000 +0200 -+++ postgresql-9.5.3/src/port/path.c 2016-08-29 22:44:10.507377613 +0200 +--- a/src/port/path.c ++++ b/src/port/path.c @@ -714,7 +714,11 @@ void get_lib_path(const char *my_exec_path, char *ret_path) diff --git a/nixpkgs/pkgs/servers/sql/rqlite/default.nix b/nixpkgs/pkgs/servers/sql/rqlite/default.nix index d590037c2403..90ed22286a60 100644 --- a/nixpkgs/pkgs/servers/sql/rqlite/default.nix +++ b/nixpkgs/pkgs/servers/sql/rqlite/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "rqlite"; - version = "8.23.4"; + version = "8.24.7"; src = fetchFromGitHub { owner = "rqlite"; repo = pname; rev = "v${version}"; - sha256 = "sha256-5/vcle0b/EypdA7IC28IYRYc5HxUC2zT/VsKLPurWPk="; + sha256 = "sha256-RuLc5IYy5NDexE1UHWrcJkvKgn4hQ0TkJFcbRIwxk18="; }; - vendorHash = "sha256-Z/Cou6NDVQVu1F4XlgMM0jI72jF2vuI6mRGhWqObXKM="; + vendorHash = "sha256-c6HQukT32jK9B48FzW0WeY7VxPkNwDipKUTrrICsaKw="; subPackages = [ "cmd/rqlite" "cmd/rqlited" "cmd/rqbench" ]; |