Unverified Commit 782b08ba authored by Maximilian Bosch's avatar Maximilian Bosch Committed by GitHub
Browse files

Merge: percona: update packages, init 8.4 (#346027)

parents dcd76105 f02bd5b0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -186,3 +186,6 @@ cffc27daf06c77c0d76bc35d24b929cb9d68c3c9

# fetchurl: nixfmt-rfc-style
ce21e97a1f20dee15da85c084f9d1148d84f853b

# percona: apply nixfmt
8d14fa2886fec877690c6d28cfcdba4503dbbcea
+5 −0
Original line number Diff line number Diff line
@@ -232,6 +232,11 @@
  Also be aware that if you have set additional options in `services.wstunnel.{clients,servers}.<name>.extraArgs`,
  that those might have been removed or modified upstream.

- `percona-server_8_4` and `mysql84` now have password authentication via the deprecated `mysql_native_password` disabled by default. This authentication plugin can be enabled via a CLI argument again, for detailed instructions and alternative authentication methods [see upstream documentation](https://dev.mysql.com/doc/refman/8.4/en/native-pluggable-authentication.html). The config file directive `default_authentication_plugin` has been removed.

- Percona has decided not to follow the LTS/ Innovation release scheme of upstream MySQL and thus [will only create releases for MySQL LTS versions](https://www.percona.com/blog/no-mysql-9-x-innovation-releases-from-percona/). Hence, the package names `percona-server_lts`, `percona-server_innovation`, `percona-xtrabackup_lts` and `percona-xtrabackup_innovation` are deprecated.
  - `percona-server` and `percona-server_lts` now point towards the new LTS release `percona-server_8_4`. The previous LTS continues to be supported and is available as `percona-server_8_0`. The same is true for the supporting `percona-xtrabackup` tooling.

- `clang-tools_<version>` packages have been moved into `llvmPackages_<version>` (i.e. `clang-tools_18` is now `llvmPackages_18.clang-tools`).
  - For convenience, the top-level `clang-tools` attribute remains and is now bound to `llvmPackages.clang-tools`.
  - Top-level `clang_tools_<version>` attributes are now aliases; these will be removed in a future release.
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
    inherit (pkgs) mysql80;
  };
  perconaPackages = {
    inherit (pkgs) percona-server_lts percona-server_innovation;
    inherit (pkgs) percona-server_8_0 percona-server_8_4;
  };
  mkTestName = pkg: "mariadb_${builtins.replaceStrings ["."] [""] (lib.versions.majorMinor pkg.version)}";
}
+119 −26
Original line number Diff line number Diff line
{ 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
, coreutils, procps, gnused, gnugrep, hostname, makeWrapper
{
  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,
  coreutils,
  procps,
  gnused,
  gnugrep,
  hostname,
  makeWrapper,
  # Percona-specific deps
, cyrus_sasl, gnumake, openldap
  cyrus_sasl,
  gnumake,
  openldap,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "percona-server_lts";
  version = "8.0.36-28";
  pname = "percona-server";
  version = "8.0.37-29";

  src = fetchurl {
    url = "https://www.percona.com/downloads/Percona-Server-8.0/Percona-Server-${finalAttrs.version}/source/tarball/percona-server-${finalAttrs.version}.tar.gz";
    hash = "sha256-iktEvZz3mjjmJ16PX51OjSwwiFS3H9W/XRco//Q6aEQ=";
    hash = "sha256-zZgq3AxCRYdte3dTUJiuMvVGdl9U01s8jxcAqDxZiNM=";
  };

  nativeBuildInputs = [
    bison cmake pkg-config makeWrapper
    bison
    cmake
    pkg-config
    makeWrapper
    # required for scripts/CMakeLists.txt
    coreutils gnugrep procps
    coreutils
    gnugrep
    procps
  ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ];

  patches = [
@@ -36,16 +75,41 @@ stdenv.mkDerivation (finalAttrs: {
    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.hostPlatform.isLinux [
    numactl libtirpc
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    cctools CoreServices developer_cmds DarwinTools
  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.hostPlatform.isLinux [
      numactl
      libtirpc
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      cctools
      CoreServices
      developer_cmds
      DarwinTools
    ];

  outputs = [ "out" "static" ];
  outputs = [
    "out"
    "static"
  ];

  cmakeFlags = [
    # Percona-specific flags.
@@ -78,11 +142,39 @@ stdenv.mkDerivation (finalAttrs: {
    so=${stdenv.hostPlatform.extensions.sharedLibrary}
    ln -s libmysqlclient$so $out/lib/libmysqlclient_r$so

    wrapProgram $out/bin/mysqld_safe --prefix PATH : ${lib.makeBinPath [ coreutils procps gnugrep gnused hostname ]}
    wrapProgram $out/bin/mysql_config --prefix PATH : ${lib.makeBinPath [ coreutils gnused ]}
    wrapProgram $out/bin/ps_mysqld_helper --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]}
    wrapProgram $out/bin/ps-admin --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]}
    wrapProgram $out/bin/mysqld_multi --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]}
    wrapProgram $out/bin/mysqld_safe --prefix PATH : ${
      lib.makeBinPath [
        coreutils
        procps
        gnugrep
        gnused
        hostname
      ]
    }
    wrapProgram $out/bin/mysql_config --prefix PATH : ${
      lib.makeBinPath [
        coreutils
        gnused
      ]
    }
    wrapProgram $out/bin/ps_mysqld_helper --prefix PATH : ${
      lib.makeBinPath [
        coreutils
        gnugrep
      ]
    }
    wrapProgram $out/bin/ps-admin --prefix PATH : ${
      lib.makeBinPath [
        coreutils
        gnugrep
      ]
    }
    wrapProgram $out/bin/mysqld_multi --prefix PATH : ${
      lib.makeBinPath [
        coreutils
        gnugrep
      ]
    }
  '';

  passthru = {
@@ -98,8 +190,9 @@ stdenv.mkDerivation (finalAttrs: {
    description = ''
      A free, fully compatible, enhanced, open source drop-in replacement for
      MySQL® that provides superior performance, scalability and instrumentation.
      Long-term support release.
    '';
    license = licenses.gpl2Plus;
    license = licenses.gpl2Only;
    maintainers = teams.flyingcircus.members;
    platforms = platforms.unix;
  };
+221 −0
Original line number Diff line number Diff line
{ 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
, coreutils, procps, gnused, gnugrep, hostname, makeWrapper
, systemd
{
  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,
  coreutils,
  procps,
  gnused,
  gnugrep,
  hostname,
  makeWrapper,
  systemd,
  # Percona-specific deps
, cyrus_sasl, gnumake, openldap
  cyrus_sasl,
  gnumake,
  openldap,
  # optional: different malloc implementations
, withJemalloc ? false, withTcmalloc ? false, jemalloc, gperftools
  withJemalloc ? false,
  withTcmalloc ? false,
  jemalloc,
  gperftools,
}:

assert !(withJemalloc && withTcmalloc);


stdenv.mkDerivation (finalAttrs: {
  pname = "percona-server_innovation";
  version = "8.3.0-1";
  pname = "percona-server";
  version = "8.4.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";
    url = "https://downloads.percona.com/downloads/Percona-Server-${lib.versions.majorMinor finalAttrs.version}/Percona-Server-${finalAttrs.version}/source/tarball/percona-server-${finalAttrs.version}.tar.gz";
    hash = "sha256-76PXXqTNBVsD7RX2vhp7RyESiFpJL0h0zG9ucNfy3uQ=";
  };

  nativeBuildInputs = [
    bison cmake pkg-config makeWrapper
    bison
    cmake
    pkg-config
    makeWrapper
    # required for scripts/CMakeLists.txt
    coreutils gnugrep procps
    coreutils
    gnugrep
    procps
  ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ];

  patches = [
@@ -42,20 +83,47 @@ stdenv.mkDerivation (finalAttrs: {
    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.hostPlatform.isLinux [
    numactl libtirpc systemd
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    cctools CoreServices developer_cmds DarwinTools
  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.hostPlatform.isLinux [
      numactl
      libtirpc
      systemd
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      cctools
      CoreServices
      developer_cmds
      DarwinTools
    ]
    ++ lib.optional (stdenv.hostPlatform.isLinux && withJemalloc) jemalloc
    ++ lib.optional (stdenv.hostPlatform.isLinux && withTcmalloc) gperftools;

  outputs = [ "out" "static" ];
  outputs = [
    "out"
    "static"
  ];

  cmakeFlags = [
  cmakeFlags =
    [
      # Percona-specific flags.
      "-DPORTABLE=1"
      "-DWITH_LDAP=system"
@@ -80,25 +148,55 @@ stdenv.mkDerivation (finalAttrs: {
      "-DINSTALL_DOCDIR=share/mysql/docs"
      "-DINSTALL_SHAREDIR=share/mysql"


  ] ++ lib.optionals stdenv.hostPlatform.isLinux [
    ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [
      "-DWITH_SYSTEMD=1"
      "-DWITH_SYSTEMD_DEBUG=1"
    ]
    ++ lib.optional (stdenv.hostPlatform.isLinux && withJemalloc) "-DWITH_JEMALLOC=1"
    ++ lib.optional (stdenv.hostPlatform.isLinux && withTcmalloc) "-DWITH_TCMALLOC=1";

  postInstall = ''
  postInstall =
    ''
      moveToOutput "lib/*.a" $static
      so=${stdenv.hostPlatform.extensions.sharedLibrary}
      ln -s libmysqlclient$so $out/lib/libmysqlclient_r$so

    wrapProgram $out/bin/mysqld_safe --prefix PATH : ${lib.makeBinPath [ coreutils procps gnugrep gnused hostname ]}
    wrapProgram $out/bin/mysql_config --prefix PATH : ${lib.makeBinPath [ coreutils gnused ]}
    wrapProgram $out/bin/ps_mysqld_helper --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]}
    wrapProgram $out/bin/ps-admin --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]}
  '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
    wrapProgram $out/bin/mysqld_multi --prefix PATH : ${lib.makeBinPath [ coreutils gnugrep ]}
      wrapProgram $out/bin/mysqld_safe --prefix PATH : ${
        lib.makeBinPath [
          coreutils
          procps
          gnugrep
          gnused
          hostname
        ]
      }
      wrapProgram $out/bin/mysql_config --prefix PATH : ${
        lib.makeBinPath [
          coreutils
          gnused
        ]
      }
      wrapProgram $out/bin/ps_mysqld_helper --prefix PATH : ${
        lib.makeBinPath [
          coreutils
          gnugrep
        ]
      }
      wrapProgram $out/bin/ps-admin --prefix PATH : ${
        lib.makeBinPath [
          coreutils
          gnugrep
        ]
      }
    ''
    + lib.optionalString stdenv.hostPlatform.isDarwin ''
      wrapProgram $out/bin/mysqld_multi --prefix PATH : ${
        lib.makeBinPath [
          coreutils
          gnugrep
        ]
      }
    '';

  passthru = {
@@ -109,14 +207,14 @@ stdenv.mkDerivation (finalAttrs: {
    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.
      Long-term support release.
    '';
    license = licenses.gpl2;
    license = licenses.gpl2Only;
    maintainers = teams.flyingcircus.members;
    platforms = platforms.unix;
  };
Loading