Unverified Commit 01e4170b authored by ajs124's avatar ajs124 Committed by GitHub
Browse files

Merge pull request #211772 from Izorkin/update-libmysqlclient

Update mariadb-connector-c libraries
parents c306c88e 611b957c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -193,6 +193,8 @@ The module update takes care of the new config syntax and the data itself (user

- `services.prometheus.exporters` has a new exporter to monitor electrical power consumption based on PowercapRAPL sensor called [Scaphandre](https://github.com/hubblo-org/scaphandre), see [#239803](https://github.com/NixOS/nixpkgs/pull/239803) for more details.

- The MariaDB C client library was upgraded from 3.2.x to 3.3.x. It is recomended to review the [upstream release notes](https://mariadb.com/kb/en/mariadb-connector-c-33-release-notes/).

- The module `services.calibre-server` has new options to configure the `host`, `port`, `auth.enable`, `auth.mode` and `auth.userDb` path, see [#216497](https://github.com/NixOS/nixpkgs/pull/216497/) for more details.

- `services.prometheus.exporters` has a new [exporter](https://github.com/hipages/php-fpm_exporter) to monitor PHP-FPM processes, see [#240394](https://github.com/NixOS/nixpkgs/pull/240394) for more details.
+2 −2
Original line number Diff line number Diff line
{ callPackage, ... } @ args:

callPackage ./. (args // {
  version = "3.1.13";
  sha256 = "0xb8fiissblxb319y5ifqqp86zblwis789ipb753pcb4zpnsaw82";
  version = "3.1.21";
  hash = "sha256-PovyQvomT8+vGWS39/QjLauiGkSiuqKQpTrSXdyVyow=";
})
+2 −2
Original line number Diff line number Diff line
{ callPackage, ... } @ args:

callPackage ./. (args // {
  version = "3.2.5";
  sha256 = "0w0fimdiiqrrm012iflz8l4rnafryq7y0qqijzxn7nwzxhm9jsr9";
  version = "3.2.7";
  hash = "sha256-nXGWJI5ml8Ccc+Fz/psoIEX1XsnXrnQ8HrrQi56lbdo=";
})
+6 −0
Original line number Diff line number Diff line
{ callPackage, ... } @ args:

callPackage ./. (args // {
  version = "3.3.5";
  hash = "sha256-ynLrJvbbK++nfkj/lm9xvNPLRLM72Lu4ELZebQEcHlw=";
})
+13 −7
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, cmake
, curl, openssl, zlib
, curl, openssl, zlib, zstd
, libiconv
, version, sha256, ...
, version, hash, ...
}:

with lib;

stdenv.mkDerivation {
let
  isVer33 = versionAtLeast version "3.3";

in stdenv.mkDerivation {
  pname = "mariadb-connector-c";
  inherit version;

  src = fetchurl {
    url = "https://downloads.mariadb.com/Connectors/c/connector-c-${version}/mariadb-connector-c-${version}-src.tar.gz";
    inherit sha256;
    inherit hash;
  };

  outputs = [ "out" "dev" ];
@@ -26,8 +29,11 @@ stdenv.mkDerivation {

  postPatch = ''
    substituteInPlace mariadb_config/mariadb_config.c.in \
      --replace '-I%s/@INSTALL_INCLUDEDIR@' "-I$dev/include" \
      --replace '-L%s/@INSTALL_LIBDIR@' "-L$out/lib/mariadb"
      --replace '#define INCLUDE "-I%s/@INSTALL_INCLUDEDIR@ -I%s/@INSTALL_INCLUDEDIR@/mysql"' "#define INCLUDE \"-I$dev/include -I$dev/include/mysql\"" \
      --replace '#define LIBS    "-L%s/@INSTALL_LIBDIR@/ -lmariadb"' "#define LIBS    \"-L$out/lib/mariadb -lmariadb\"" \
      --replace '#define PKG_LIBDIR "%s/@INSTALL_LIBDIR@"' "#define PKG_LIBDIR \"$out/lib/mariadb\"" \
      --replace '#define PLUGIN_DIR "%s/@INSTALL_PLUGINDIR@"' "#define PLUGIN_DIR \"$out/lib/mariadb/plugin\"" \
      --replace '#define PKG_PLUGINDIR "%s/@INSTALL_PLUGINDIR@"' "#define PKG_PLUGINDIR \"$out/lib/mariadb/plugin\""
  '' + lib.optionalString stdenv.hostPlatform.isStatic ''
    # Disables all dynamic plugins
    substituteInPlace cmake/plugins.cmake \
@@ -43,7 +49,7 @@ stdenv.mkDerivation {
  '';

  nativeBuildInputs = [ cmake ];
  propagatedBuildInputs = [ curl openssl zlib ];
  propagatedBuildInputs = [ curl openssl zlib ] ++ optional isVer33 zstd;
  buildInputs = [ libiconv ];

  postInstall = ''
Loading