35 pythonDeps = with python3.pkgs; [ certifi paramiko pyyaml ];
37 mysqlShellVersion = "8.3.0";
38 mysqlServerVersion = "8.3.0";
40 stdenv.mkDerivation (finalAttrs: {
41 pname = "mysql-shell-innovation";
42 version = mysqlShellVersion;
46 url = "https://cdn.mysql.com//Downloads/MySQL-${lib.versions.majorMinor mysqlServerVersion}/mysql-${mysqlServerVersion}.tar.gz";
47 hash = "sha256-HyFJWgt6grJKRT1S4hU6gUs8pwTsz5mXZtVFvOUvOG4=";
50 url = "https://cdn.mysql.com//Downloads/MySQL-Shell/mysql-shell-${finalAttrs.version}-src.tar.gz";
51 hash = "sha256-O0j/gvS9fR/xp9plytjj249H7LY/+eyst1IsFpy318U=";
55 sourceRoot = "mysql-shell-${finalAttrs.version}-src";
58 mv mysql-${mysqlServerVersion} mysql
62 substituteInPlace ../mysql/cmake/libutils.cmake --replace /usr/bin/libtool libtool
63 substituteInPlace ../mysql/cmake/os/Darwin.cmake --replace /usr/bin/libtool libtool
65 substituteInPlace cmake/libutils.cmake --replace /usr/bin/libtool libtool
68 nativeBuildInputs = [ pkg-config cmake git bison makeWrapper ]
69 ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ]
70 ++ lib.optionals stdenv.isDarwin [ cctools DarwinTools ];
92 ++ lib.optionals stdenv.isLinux [ libtirpc ]
93 ++ lib.optionals stdenv.isDarwin [ CoreServices ];
97 echo "Building mysqlclient mysqlxclient"
99 cmake -DWITH_SYSTEM_LIBS=ON -DWITH_FIDO=system -DWITH_ROUTER=OFF -DWITH_UNIT_TESTS=OFF \
100 -DFORCE_UNSUPPORTED_COMPILER=1 -S ../mysql -B ../mysql/build
102 cmake --build ../mysql/build --parallel ''${NIX_BUILD_CORES:-1} --target mysqlclient mysqlxclient
106 "-DMYSQL_SOURCE_DIR=../mysql"
107 "-DMYSQL_BUILD_DIR=../mysql/build"
108 "-DMYSQL_CONFIG_EXECUTABLE=../../mysql/build/scripts/mysql_config"
112 "-DWITH_PROTOBUF=${protobuf}"
117 wrapProgram $out/bin/mysqlsh --set PYTHONPATH "${lib.makeSearchPath python3.sitePackages pythonDeps}"
121 homepage = "https://dev.mysql.com/doc/mysql-shell/${lib.versions.majorMinor finalAttrs.version}/en/";
122 description = "A new command line scriptable shell for MySQL";
123 license = licenses.gpl2;
124 maintainers = with maintainers; [ aaronjheng ];
125 mainProgram = "mysqlsh";