16 , libmysqlconnectorcpp
46 inherit (python3.pkgs) paramiko pycairo pyodbc;
47 in stdenv.mkDerivation rec {
48 pname = "mysql-workbench";
52 url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz";
53 sha256 = "d094b391760948f42a3b879e8473040ae9bb26991eced482eb982a52c8ff8185";
57 ./fix-gdal-includes.patch
60 src = ./hardcode-paths.patch;
61 catchsegv = "${glibc.bin}/bin/catchsegv";
62 bash = "${bash}/bin/bash";
63 cp = "${coreutils}/bin/cp";
64 dd = "${coreutils}/bin/dd";
65 ls = "${coreutils}/bin/ls";
66 mkdir = "${coreutils}/bin/mkdir";
67 nohup = "${coreutils}/bin/nohup";
68 rm = "${coreutils}/bin/rm";
69 rmdir = "${coreutils}/bin/rmdir";
70 stat = "${coreutils}/bin/stat";
71 sudo = "${sudo}/bin/sudo";
74 # Fix swig not being able to find headers
75 # https://github.com/NixOS/nixpkgs/pull/82362#issuecomment-597948461
77 src = ./fix-swig-build.patch;
78 cairoDev = "${cairo.dev}";
82 # 1. have it look for 4.9.3 instead of 4.9.1
83 # 2. for some reason CMakeCache.txt is part of source code
85 substituteInPlace CMakeLists.txt \
86 --replace "antlr-4.9.1-complete.jar" "antlr-4.9.3-complete.jar"
87 rm -f build/CMakeCache.txt
123 # python dependencies:
127 # TODO: package sqlanydb and add it here
129 # transitive dependencies:
140 patchShebangs tools/get_wb_version.sh
143 # error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
144 NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
147 "-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"
148 "-DIODBC_CONFIG_PATH=${libiodbc}/bin/iodbc-config"
149 # mysql-workbench 8.0.21 depends on libmysqlconnectorcpp 1.1.8.
150 # Newer versions of connector still provide the legacy library when enabled
151 # but the headers are in a different location.
152 "-DWITH_ANTLR_JAR=${antlr4_9.jarLocation}"
153 "-DMySQLCppConn_INCLUDE_DIR=${libmysqlconnectorcpp}/include/jdbc"
156 # There is already an executable and a wrapper in bindir
157 # No need to wrap both
158 dontWrapGApps = true;
162 --prefix PATH : "${python3}/bin"
163 --prefix PROJSO : "${proj}/lib/libproj.so"
164 --set PYTHONPATH $PYTHONPATH
168 # Let’s wrap the programs not ending with bin
169 # until https://bugs.mysql.com/bug.php?id=91948 is fixed
171 find -L "$out/bin" -type f -executable -print0 \
172 | while IFS= read -r -d ''' file; do
173 if [[ "''${file}" != *-bin ]]; then
174 echo "Wrapping program $file"
181 description = "Visual MySQL database modeling, administration and querying tool";
183 MySQL Workbench is a modeling tool that allows you to design
184 and generate MySQL databases graphically. It also has administration
185 and query development modules where you can manage MySQL server instances
186 and execute SQL queries.
189 homepage = "http://wb.mysql.com/";
190 license = licenses.gpl2;
192 platforms = platforms.linux;