36 pythonDeps = with python3.pkgs; [ certifi paramiko pyyaml ];
38 mysqlShellVersion = "8.2.0";
39 mysqlServerVersion = "8.2.0";
41 stdenv.mkDerivation (finalAttrs: {
42 pname = "mysql-shell-innovation";
43 version = mysqlShellVersion;
47 url = "https://cdn.mysql.com//Downloads/MySQL-${lib.versions.majorMinor mysqlServerVersion}/mysql-${mysqlServerVersion}.tar.gz";
48 hash = "sha256-itPj8cWuIVS+Y4rPVW6JgfcC0FKsxZV+d23xciwhGXk=";
51 url = "https://cdn.mysql.com//Downloads/MySQL-Shell/mysql-shell-${finalAttrs.version}-src.tar.gz";
52 hash = "sha256-kuRo+3vcDtc9aOgAuxJTy0e6E85iOFfCx/ZHtrNg08k=";
56 sourceRoot = "mysql-shell-${finalAttrs.version}-src";
59 mv mysql-${mysqlServerVersion} mysql
63 substituteInPlace ../mysql/cmake/libutils.cmake --replace /usr/bin/libtool libtool
64 substituteInPlace ../mysql/cmake/os/Darwin.cmake --replace /usr/bin/libtool libtool
66 substituteInPlace cmake/libutils.cmake --replace /usr/bin/libtool libtool
69 nativeBuildInputs = [ pkg-config cmake git bison makeWrapper ]
70 ++ lib.optionals (!stdenv.isDarwin) [ rpcsvc-proto ]
71 ++ lib.optionals stdenv.isDarwin [ cctools DarwinTools ];
94 ++ lib.optionals stdenv.isLinux [ libtirpc ]
95 ++ lib.optionals stdenv.isDarwin [ CoreServices ];
99 echo "Building mysqlclient mysqlxclient"
101 cmake -DWITH_BOOST=system -DWITH_SYSTEM_LIBS=ON -DWITH_ROUTER=OFF -DWITH_UNIT_TESTS=OFF \
102 -DFORCE_UNSUPPORTED_COMPILER=1 -S ../mysql -B ../mysql/build
104 cmake --build ../mysql/build --parallel ''${NIX_BUILD_CORES:-1} --target mysqlclient mysqlxclient
108 "-DMYSQL_SOURCE_DIR=../mysql"
109 "-DMYSQL_BUILD_DIR=../mysql/build"
110 "-DMYSQL_CONFIG_EXECUTABLE=../../mysql/build/scripts/mysql_config"
114 "-DWITH_PROTOBUF=${protobuf}"
119 wrapProgram $out/bin/mysqlsh --set PYTHONPATH "${lib.makeSearchPath python3.sitePackages pythonDeps}"
123 homepage = "https://dev.mysql.com/doc/mysql-shell/${lib.versions.majorMinor finalAttrs.version}/en/";
124 description = "A new command line scriptable shell for MySQL";
125 license = licenses.gpl2;
126 maintainers = with maintainers; [ aaronjheng ];
127 mainProgram = "mysqlsh";