forked from flyingcircusio/fc-nixos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request flyingcircusio#1129 from flyingcircusio/PL-133101-…
…update-nixpkgs update nixpkgs (2024-10-21)
- Loading branch information
Showing
16 changed files
with
303 additions
and
59 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The files in this directory are based on [MIT-licensed](https://github.com/NixOS/nixpkgs/blob/b77eabd1a282aa08b1759739c0a4b1b19318f088/COPYING) work done by other Nixpkgs/NixOS contributors, taken from revision b77eabd1a282aa08b1759739c0a4b1b19318f088 in the [nixpkgs](https://github.com/NixOS/nixpkgs/) repository under the path [pkgs/tools/backup/percona-xtrabackup](https://github.com/NixOS/nixpkgs/blob/b77eabd1a282aa08b1759739c0a4b1b19318f088/pkgs/tools/backup/percona-xtrabackup). | ||
|
||
The modifications made are licensed under the MIT License as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
MySQL ABI check assumes that with -nostdinc any standard #include terminates | ||
preprocessing, but we do not provide that: | ||
https://github.com/NixOS/nixpkgs/issues/44530 | ||
|
||
"#error" does not terminate preprocessing, so we #include a non-existent file instead. | ||
|
||
--- a/cmake/do_abi_check.cmake | ||
+++ b/cmake/do_abi_check.cmake | ||
@@ -68,1 +68,1 @@ FOREACH(file ${ABI_HEADERS}) | ||
- -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${ABI_SOURCE_DIR}/include | ||
+ -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${ABI_SOURCE_DIR}/include/nostdinc -I${ABI_SOURCE_DIR}/include | ||
@@ -74,1 +74,1 @@ FOREACH(file ${ABI_HEADERS}) | ||
- COMMAND ${WSL_EXECUTABLE} sed -e "/^# /d" | ||
+ COMMAND ${WSL_EXECUTABLE} sed -e "/^# /d" -e "/^#include <-nostdinc>$/d" | ||
--- /dev/null | ||
+++ b/include/nostdinc/stdint.h | ||
@@ -0,0 +1,1 @@ | ||
+#include <-nostdinc> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pkgs: { | ||
percona-xtrabackup_lts = pkgs.callPackage ./lts.nix { | ||
boost = pkgs.boost177; | ||
}; | ||
percona-xtrabackup_innovation = pkgs.callPackage ./innovation.nix { }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ lib, stdenv, fetchFromGitHub, bison, boost, cmake, makeWrapper, pkg-config | ||
, curl, cyrus_sasl, libaio, libedit, libev, libevent, libgcrypt, libgpg-error, lz4 | ||
, ncurses, numactl, openssl, procps, protobuf, valgrind, xxd, zlib | ||
, perlPackages | ||
, version, hash, fetchSubmodules ? false, extraPatches ? [], extraPostInstall ? "", ... | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "percona-xtrabackup"; | ||
inherit version; | ||
|
||
src = fetchFromGitHub { | ||
owner = "percona"; | ||
repo = "percona-xtrabackup"; | ||
rev = "${finalAttrs.pname}-${finalAttrs.version}"; | ||
inherit hash fetchSubmodules; | ||
}; | ||
|
||
nativeBuildInputs = [ bison boost cmake makeWrapper pkg-config ]; | ||
|
||
buildInputs = [ | ||
(curl.override { inherit openssl; }) cyrus_sasl libaio libedit libevent libev libgcrypt libgpg-error lz4 | ||
ncurses numactl openssl procps protobuf valgrind xxd zlib | ||
] ++ (with perlPackages; [ perl DBI DBDmysql ]); | ||
|
||
patches = extraPatches; | ||
|
||
cmakeFlags = [ | ||
"-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" | ||
"-DBUILD_CONFIG=xtrabackup_release" | ||
"-DINSTALL_MYSQLTESTDIR=OFF" | ||
"-DWITH_BOOST=system" | ||
"-DWITH_CURL=system" | ||
"-DWITH_EDITLINE=system" | ||
"-DWITH_LIBEVENT=system" | ||
"-DWITH_LZ4=system" | ||
"-DWITH_PROTOBUF=system" | ||
"-DWITH_SASL=system" | ||
"-DWITH_SSL=system" | ||
"-DWITH_ZLIB=system" | ||
"-DWITH_VALGRIND=ON" | ||
"-DWITH_MAN_PAGES=OFF" | ||
]; | ||
|
||
postInstall = '' | ||
wrapProgram "$out"/bin/xtrabackup --prefix PERL5LIB : $PERL5LIB | ||
rm -r "$out"/lib/plugin/debug | ||
'' + extraPostInstall; | ||
|
||
passthru.mysqlVersion = lib.versions.majorMinor finalAttrs.version; | ||
|
||
meta = with lib; { | ||
description = "Non-blocking backup tool for MySQL"; | ||
homepage = "http://www.percona.com/software/percona-xtrabackup"; | ||
license = licenses.lgpl2; | ||
platforms = platforms.linux; | ||
maintainers = teams.flyingcircus.members ++ [ maintainers.izorkin ]; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ callPackage, ... } @ args: | ||
|
||
callPackage ./generic.nix (args // { | ||
version = "8.3.0-1"; | ||
hash = "sha256-qZM2AFhpwrN0BR+DdozYn7s2I+c1tWpD5QvppTEfGEY="; | ||
|
||
# includes https://github.com/Percona-Lab/libkmip.git | ||
fetchSubmodules = true; | ||
|
||
extraPatches = [ | ||
]; | ||
|
||
extraPostInstall = '' | ||
''; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ callPackage, ... } @ args: | ||
|
||
callPackage ./generic.nix (args // { | ||
version = "8.0.35-30"; | ||
hash = "sha256-yagqBKU057Gk5pEyT2R3c5DtxNG/+TSPenFgbxUiHPo="; | ||
|
||
# includes https://github.com/Percona-Lab/libkmip.git | ||
fetchSubmodules = true; | ||
|
||
extraPatches = [ | ||
./abi-check.patch | ||
]; | ||
|
||
extraPostInstall = '' | ||
rm -r "$out"/docs | ||
''; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The files in this directory are based on [MIT-licensed](https://github.com/NixOS/nixpkgs/blob/b77eabd1a282aa08b1759739c0a4b1b19318f088/COPYING) work done by other Nixpkgs/NixOS contributors. | ||
|
||
Percona 8.3 filese are taken from revision b77eabd1a282aa08b1759739c0a4b1b19318f088 in the [nixpkgs](https://github.com/NixOS/nixpkgs/) repository under the path [pkgs/servers/sql/percona-server](https://github.com/NixOS/nixpkgs/blob/b77eabd1a282aa08b1759739c0a4b1b19318f088/pkgs/servers/sql/percona-server). | ||
|
||
The modifications made are licensed under the MIT License as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,6 +229,7 @@ | |
"xz", | ||
"zip", | ||
"zlib", | ||
"zoneminder", | ||
"zsh", | ||
"zstd" | ||
] |
Oops, something went wrong.