chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / my / mysql84 / package.nix
blob1c4d655efd4b9dee84e7a33ec92b96f6fe5f2060
1 { lib, stdenv, fetchurl, bison, cmake, pkg-config
2 , icu, libedit, libevent, lz4, ncurses, openssl, protobuf_21, re2, readline, zlib, zstd, libfido2
3 , cctools, darwin, numactl, libtirpc, rpcsvc-proto, curl
4 }:
6 stdenv.mkDerivation (finalAttrs: {
7   pname = "mysql";
8   version = "8.4.2";
10   src = fetchurl {
11     url = "https://dev.mysql.com/get/Downloads/MySQL-${lib.versions.majorMinor finalAttrs.version}/mysql-${finalAttrs.version}.tar.gz";
12     hash = "sha256-Vlenjchr8L8iJ+CwX43losRHqBahEv+ib6cAg7y+mBQ=";
13   };
15   nativeBuildInputs = [ bison cmake pkg-config ]
16     ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ rpcsvc-proto ];
18   patches = [
19     ./no-force-outline-atomics.patch # Do not force compilers to turn on -moutline-atomics switch
20   ];
22   ## NOTE: MySQL upstream frequently twiddles the invocations of libtool. When updating, you might proactively grep for libtool references.
23   postPatch = ''
24     substituteInPlace cmake/libutils.cmake --replace /usr/bin/libtool libtool
25     substituteInPlace cmake/os/Darwin.cmake --replace /usr/bin/libtool libtool
26   '';
28   buildInputs = [
29     (curl.override { inherit openssl; }) icu libedit libevent lz4 ncurses openssl protobuf_21 re2 readline zlib
30     zstd libfido2
31   ] ++ lib.optionals stdenv.hostPlatform.isLinux [
32     numactl libtirpc
33   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
34     cctools darwin.apple_sdk.frameworks.CoreServices darwin.developer_cmds darwin.DarwinTools
35   ];
37   outputs = [ "out" "static" ];
39   cmakeFlags = [
40     "-DFORCE_UNSUPPORTED_COMPILER=1" # To configure on Darwin.
41     "-DWITH_ROUTER=OFF" # It may be packaged separately.
42     "-DWITH_SYSTEM_LIBS=ON"
43     "-DWITH_UNIT_TESTS=OFF"
44     "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
45     "-DMYSQL_DATADIR=/var/lib/mysql"
46     "-DINSTALL_INFODIR=share/mysql/docs"
47     "-DINSTALL_MANDIR=share/man"
48     "-DINSTALL_PLUGINDIR=lib/mysql/plugin"
49     "-DINSTALL_INCLUDEDIR=include/mysql"
50     "-DINSTALL_DOCREADMEDIR=share/mysql"
51     "-DINSTALL_SUPPORTFILESDIR=share/mysql"
52     "-DINSTALL_MYSQLSHAREDIR=share/mysql"
53     "-DINSTALL_MYSQLTESTDIR="
54     "-DINSTALL_DOCDIR=share/mysql/docs"
55     "-DINSTALL_SHAREDIR=share/mysql"
56   ];
58   postInstall = ''
59     moveToOutput "lib/*.a" $static
60     so=${stdenv.hostPlatform.extensions.sharedLibrary}
61     ln -s libmysqlclient$so $out/lib/libmysqlclient_r$so
62   '';
64   passthru = {
65     client = finalAttrs.finalPackage;
66     connector-c = finalAttrs.finalPackage;
67     server = finalAttrs.finalPackage;
68     mysqlVersion = lib.versions.majorMinor finalAttrs.version;
69   };
71   meta = with lib; {
72     homepage = "https://www.mysql.com/";
73     description = "World's most popular open source database";
74     license = licenses.gpl2;
75     maintainers = with maintainers; [ orivej shyim ];
76     platforms = platforms.unix;
77   };