From 070b49ed00b090b444f77d50d07acc34749ebe7c Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 12 Mar 2020 01:08:10 +0100 Subject: [PATCH] =?UTF-8?q?mysql-workbench:=208.0.15=20=E2=86=92=208.0.19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * https://dev.mysql.com/doc/relnotes/workbench/en/news-8-0-16.html * https://dev.mysql.com/doc/relnotes/workbench/en/news-8-0-17.html * https://dev.mysql.com/doc/relnotes/workbench/en/news-8-0-18.html * https://dev.mysql.com/doc/relnotes/workbench/en/news-8-0-19.html The release notes contain the following: Important Note: MySQL Workbench 8.0.19 is unable to open a new connection to MySQL Server from the home screen if the server is not started and you cannot start a server by using the Workbench Administration feature. Administrative and SQL editing tasks require an online server for the duration of this issue. Feature tasks that you performed with an offline server in previous releases now return an error message indicating that the server is unreachable. but it is clearly better than having it broken. --- .../misc/mysql-workbench/default.nix | 17 +++++++++++++++-- .../misc/mysql-workbench/fix-swig-build.patch | 12 ++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/misc/mysql-workbench/fix-swig-build.patch diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix index d0c2e45f306..03483a1a2b8 100644 --- a/pkgs/applications/misc/mysql-workbench/default.nix +++ b/pkgs/applications/misc/mysql-workbench/default.nix @@ -29,6 +29,7 @@ , libsigcxx , libX11 , openssl +, rapidjson , proj , cairo , libxkbcommon @@ -44,11 +45,11 @@ let inherit (python2.pkgs) paramiko pycairo pyodbc; in stdenv.mkDerivation rec { pname = "mysql-workbench"; - version = "8.0.15"; + version = "8.0.19"; src = fetchurl { url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz"; - sha256 = "0ca93azasya5xiw6j2map8drmxf445qqydpvrb512kjfqdiv67x6"; + sha256 = "unrszSK+tKcARSHxRSAAos+jDtYxdDcSnFENixaDJsw="; }; patches = [ @@ -67,6 +68,13 @@ in stdenv.mkDerivation rec { rmdir = "${coreutils}/bin/rmdir"; sudo = "${sudo}/bin/sudo"; }) + + # Fix swig not being able to find headers + # https://github.com/NixOS/nixpkgs/pull/82362#issuecomment-597948461 + (substituteAll { + src = ./fix-swig-build.patch; + cairoDev = "${cairo.dev}"; + }) ]; # have it look for 4.7.2 instead of 4.7.1 @@ -98,6 +106,7 @@ in stdenv.mkDerivation rec { boost libssh openssl + rapidjson libiodbc pcre cairo @@ -133,6 +142,10 @@ in stdenv.mkDerivation rec { "-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config" "-DIODBC_CONFIG_PATH=${libiodbc}/bin/iodbc-config" "-DWITH_ANTLR_JAR=${antlr4_7.jarLocation}" + # mysql-workbench 8.0.19 depends on libmysqlconnectorcpp 1.1.8. + # Newer versions of connector still provide the legacy library when enabled + # but the headers are in a different location. + "-DMySQLCppConn_INCLUDE_DIR=${libmysqlconnectorcpp}/include/jdbc" ]; # There is already an executable and a wrapper in bindir diff --git a/pkgs/applications/misc/mysql-workbench/fix-swig-build.patch b/pkgs/applications/misc/mysql-workbench/fix-swig-build.patch new file mode 100644 index 00000000000..ace1e5add43 --- /dev/null +++ b/pkgs/applications/misc/mysql-workbench/fix-swig-build.patch @@ -0,0 +1,12 @@ +--- a/library/forms/swig/CMakeLists.txt ++++ b/library/forms/swig/CMakeLists.txt +@@ -57,7 +57,7 @@ + + set(CMAKE_SWIG_FLAGS -w312) + set_source_files_properties(cairo.i PROPERTIES CPLUSPLUS ON) +-set_property(SOURCE cairo.i PROPERTY SWIG_FLAGS -DCAIRO_HAS_PNG_FUNCTIONS=1 -fcompact -DSWIG_PYTHON_LEGACY_BOOL -I/usr/include) ++set_property(SOURCE cairo.i PROPERTY SWIG_FLAGS -DCAIRO_HAS_PNG_FUNCTIONS=1 -fcompact -DSWIG_PYTHON_LEGACY_BOOL -I@cairoDev@/include) + if(CMAKE_VERSION VERSION_LESS 3.8) + swig_add_module(cairo python cairo.i) + else() +