After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 78e9caf153f5a339bf1d4c000ff6f0a503a369c8
result/bin/apply-formatting $NIXPKGS_PATH
128 lines
2.9 KiB
Nix
128 lines
2.9 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchurl,
|
|
bison,
|
|
cmake,
|
|
pkg-config,
|
|
icu,
|
|
libedit,
|
|
libevent,
|
|
lz4,
|
|
ncurses,
|
|
openssl,
|
|
protobuf_21,
|
|
re2,
|
|
readline,
|
|
zlib,
|
|
zstd,
|
|
libfido2,
|
|
cctools,
|
|
darwin,
|
|
numactl,
|
|
libtirpc,
|
|
rpcsvc-proto,
|
|
curl,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "mysql";
|
|
version = "8.4.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://dev.mysql.com/get/Downloads/MySQL-${lib.versions.majorMinor finalAttrs.version}/mysql-${finalAttrs.version}.tar.gz";
|
|
hash = "sha256-eslWTEeAIvcwBf+Ju7QPZ7OB/AbVUYQWvf/sdeYluBg=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
bison
|
|
cmake
|
|
pkg-config
|
|
] ++ lib.optionals (!stdenv.hostPlatform.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
|
|
'';
|
|
|
|
buildInputs =
|
|
[
|
|
(curl.override { inherit openssl; })
|
|
icu
|
|
libedit
|
|
libevent
|
|
lz4
|
|
ncurses
|
|
openssl
|
|
protobuf_21
|
|
re2
|
|
readline
|
|
zlib
|
|
zstd
|
|
libfido2
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
numactl
|
|
libtirpc
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
cctools
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
darwin.developer_cmds
|
|
darwin.DarwinTools
|
|
];
|
|
|
|
outputs = [
|
|
"out"
|
|
"static"
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-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"
|
|
];
|
|
|
|
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;
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "https://www.mysql.com/";
|
|
description = "World's most popular open source database";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [
|
|
orivej
|
|
shyim
|
|
];
|
|
platforms = platforms.unix;
|
|
};
|
|
})
|