diff --git a/pkgs/applications/misc/mysql-workbench/default.nix b/pkgs/applications/misc/mysql-workbench/default.nix index d0c2e45f3062..03483a1a2b8a 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 000000000000..ace1e5add43f --- /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() +