Merge pull request #256888 from aaronjheng/mysql-shell-innovation

mysql-shell-innovation: init at 8.1.1

authored by Mario Rodas and committed by GitHub 1bdb15de f96942e6

+139
+130
pkgs/development/tools/mysql-shell/innovation.nix
···
··· 1 + { lib 2 + , stdenv 3 + , pkg-config 4 + , cmake 5 + , fetchurl 6 + , git 7 + , cctools 8 + , developer_cmds 9 + , DarwinTools 10 + , makeWrapper 11 + , CoreServices 12 + , bison 13 + , openssl 14 + , protobuf 15 + , curl 16 + , zlib 17 + , libssh 18 + , zstd 19 + , lz4 20 + , boost 21 + , readline 22 + , libtirpc 23 + , rpcsvc-proto 24 + , libedit 25 + , libevent 26 + , icu 27 + , re2 28 + , ncurses 29 + , libfido2 30 + , python3 31 + , cyrus_sasl 32 + , openldap 33 + , antlr 34 + }: 35 + 36 + let 37 + pythonDeps = with python3.pkgs; [ certifi paramiko pyyaml ]; 38 + 39 + mysqlShellVersion = "8.1.1"; 40 + mysqlServerVersion = "8.1.0"; 41 + in 42 + stdenv.mkDerivation (finalAttrs: { 43 + pname = "mysql-shell-innovation"; 44 + version = mysqlShellVersion; 45 + 46 + srcs = [ 47 + (fetchurl { 48 + url = "https://cdn.mysql.com//Downloads/MySQL-${lib.versions.majorMinor mysqlServerVersion}/mysql-${mysqlServerVersion}.tar.gz"; 49 + hash = "sha256-PdAXqUBzSqkHlqTGXhJeZxL2S7u+M4jTZGneqoe1mes="; 50 + }) 51 + (fetchurl { 52 + url = "https://cdn.mysql.com//Downloads/MySQL-Shell/mysql-shell-${finalAttrs.version}-src.tar.gz"; 53 + hash = "sha256-X7A2h9PWgQgNg7h64oD+Th/KsqP3UGpJ2etaP2B0VuY="; 54 + }) 55 + ]; 56 + 57 + sourceRoot = "mysql-shell-${finalAttrs.version}-src"; 58 + 59 + postUnpack = '' 60 + mv mysql-${mysqlServerVersion} mysql 61 + ''; 62 + 63 + postPatch = '' 64 + substituteInPlace ../mysql/cmake/libutils.cmake --replace /usr/bin/libtool libtool 65 + substituteInPlace ../mysql/cmake/os/Darwin.cmake --replace /usr/bin/libtool libtool 66 + 67 + substituteInPlace cmake/libutils.cmake --replace /usr/bin/libtool libtool 68 + ''; 69 + 70 + nativeBuildInputs = [ pkg-config cmake git bison makeWrapper ] 71 + ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ] 72 + ++ lib.optionals stdenv.isDarwin [ cctools developer_cmds DarwinTools ]; 73 + 74 + buildInputs = [ 75 + boost 76 + curl 77 + libedit 78 + libssh 79 + lz4 80 + openssl 81 + protobuf 82 + readline 83 + zlib 84 + zstd 85 + libevent 86 + icu 87 + re2 88 + ncurses 89 + libfido2 90 + cyrus_sasl 91 + openldap 92 + python3 93 + antlr.runtime.cpp 94 + ] ++ pythonDeps 95 + ++ lib.optionals stdenv.isLinux [ libtirpc ] 96 + ++ lib.optionals stdenv.isDarwin [ CoreServices ]; 97 + 98 + preConfigure = '' 99 + # Build MySQL 100 + echo "Building mysqlclient mysqlxclient" 101 + 102 + cmake -DWITH_BOOST=system -DWITH_SYSTEM_LIBS=ON -DWITH_ROUTER=OFF -DWITH_UNIT_TESTS=OFF \ 103 + -DFORCE_UNSUPPORTED_COMPILER=1 -S ../mysql -B ../mysql/build 104 + 105 + cmake --build ../mysql/build --parallel ''${NIX_BUILD_CORES:-1} --target mysqlclient mysqlxclient 106 + ''; 107 + 108 + cmakeFlags = [ 109 + "-DMYSQL_SOURCE_DIR=../mysql" 110 + "-DMYSQL_BUILD_DIR=../mysql/build" 111 + "-DMYSQL_CONFIG_EXECUTABLE=../../mysql/build/scripts/mysql_config" 112 + "-DWITH_ZSTD=system" 113 + "-DWITH_LZ4=system" 114 + "-DWITH_ZLIB=system" 115 + "-DWITH_PROTOBUF=${protobuf}" 116 + "-DHAVE_PYTHON=1" 117 + ]; 118 + 119 + postFixup = '' 120 + wrapProgram $out/bin/mysqlsh --set PYTHONPATH "${lib.makeSearchPath python3.sitePackages pythonDeps}" 121 + ''; 122 + 123 + meta = with lib; { 124 + homepage = "https://dev.mysql.com/doc/mysql-shell/${lib.versions.majorMinor finalAttrs.version}/en/"; 125 + description = "A new command line scriptable shell for MySQL"; 126 + license = licenses.gpl2; 127 + maintainers = with maintainers; [ aaronjheng ]; 128 + mainProgram = "mysqlsh"; 129 + }; 130 + })
+9
pkgs/top-level/all-packages.nix
··· 1092 protobuf = protobuf3_21; 1093 }; 1094 1095 broadlink-cli = callPackage ../tools/misc/broadlink-cli { }; 1096 1097 fetchpatch = callPackage ../build-support/fetchpatch {
··· 1092 protobuf = protobuf3_21; 1093 }; 1094 1095 + mysql-shell-innovation = callPackage ../development/tools/mysql-shell/innovation.nix { 1096 + inherit (darwin) cctools developer_cmds DarwinTools; 1097 + inherit (darwin.apple_sdk.frameworks) CoreServices; 1098 + antlr = antlr4_10; 1099 + boost = boost177; # Configure checks for specific version. 1100 + icu = icu69; 1101 + protobuf = protobuf3_21; 1102 + }; 1103 + 1104 broadlink-cli = callPackage ../tools/misc/broadlink-cli { }; 1105 1106 fetchpatch = callPackage ../build-support/fetchpatch {