Merge pull request #82362 from jtojnar/mysql-wb

mysql-workbench: 8.0.15 → 8.0.19
This commit is contained in:
Jan Tojnar 2020-03-14 04:41:36 +01:00 committed by GitHub
commit f5fade94bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 136 additions and 30 deletions

View File

@ -1,27 +1,60 @@
{ stdenv, fetchurl, substituteAll, cmake, ninja, pkgconfig
, glibc, gtk3, gtkmm3, pcre, swig, antlr4_7, sudo
, mysql, libxml2, libmysqlconnectorcpp
, vsqlite, gdal, libiodbc, libpthreadstubs
, libXdmcp, libuuid, libzip, libsecret, libssh
, python2, jre
, boost, libsigcxx, libX11, openssl
, proj, cairo, libxkbcommon, epoxy, wrapGAppsHook
, at-spi2-core, dbus, bash, coreutils
{ stdenv
, fetchurl
, substituteAll
, cmake
, ninja
, pkgconfig
, glibc
, gtk3
, gtkmm3
, pcre
, swig
, antlr4_7
, sudo
, mysql
, libxml2
, libmysqlconnectorcpp
, vsqlite
, gdal
, libiodbc
, libpthreadstubs
, libXdmcp
, libuuid
, libzip
, libsecret
, libssh
, python2
, jre
, boost
, libsigcxx
, libX11
, openssl
, rapidjson
, proj
, cairo
, libxkbcommon
, epoxy
, wrapGAppsHook
, at-spi2-core
, dbus
, bash
, coreutils
}:
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 = [
./fix-gdal-includes.patch
(substituteAll {
src = ./hardcode-paths.patch;
catchsegv = "${glibc.bin}/bin/catchsegv";
@ -35,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
@ -44,31 +84,68 @@ in stdenv.mkDerivation rec {
'';
nativeBuildInputs = [
cmake ninja pkgconfig jre swig wrapGAppsHook
cmake
ninja
pkgconfig
jre
swig
wrapGAppsHook
];
buildInputs = [
gtk3 gtkmm3 libX11 antlr4_7.runtime.cpp python2 mysql libxml2
libmysqlconnectorcpp vsqlite gdal boost libssh openssl
libiodbc pcre cairo libuuid libzip libsecret
libsigcxx proj
gtk3
gtkmm3
libX11
antlr4_7.runtime.cpp
python2
mysql
libxml2
libmysqlconnectorcpp
vsqlite
gdal
boost
libssh
openssl
rapidjson
libiodbc
pcre
cairo
libuuid
libzip
libsecret
libsigcxx
proj
# python dependencies:
paramiko pycairo pyodbc # sqlanydb
paramiko
pycairo
pyodbc
# TODO: package sqlanydb and add it here
# transitive dependencies:
libpthreadstubs libXdmcp libxkbcommon epoxy at-spi2-core dbus
libpthreadstubs
libXdmcp
libxkbcommon
epoxy
at-spi2-core
dbus
];
postPatch = ''
patchShebangs tools/get_wb_version.sh
'';
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
cmakeFlags = [
"-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
@ -104,7 +181,7 @@ in stdenv.mkDerivation rec {
and execute SQL queries.
'';
homepage = http://wb.mysql.com/;
homepage = "http://wb.mysql.com/";
license = licenses.gpl2;
maintainers = [ maintainers.kkallio ];
platforms = platforms.linux;

View File

@ -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()

View File

@ -1,20 +1,39 @@
{ stdenv, fetchurl, cmake, boost, mysql }:
{ stdenv
, fetchurl
, cmake
, boost
, openssl
, mysql80
}:
stdenv.mkDerivation rec {
pname = "libmysqlconnectorcpp";
version = "1.1.9";
version = "8.0.19";
src = fetchurl {
url = "https://cdn.mysql.com/Downloads/Connector-C++/mysql-connector-c++-${version}.tar.gz";
sha256 = "1r6j17sy5816a2ld759iis2k6igc2w9p70y4nw9w3rd4d5x88c9y";
url = "https://cdn.mysql.com/Downloads/Connector-C++/mysql-connector-c++-${version}-src.tar.gz";
sha256 = "fDvXTOZKkwDn1IG3aziK2VAXpSSAxpi3VVea7GLUoh4=";
};
buildInputs = [ cmake boost mysql ];
nativeBuildInputs = [
cmake
];
cmakeFlags = [ "-DMYSQL_LIB_DIR=${mysql}/lib" ];
buildInputs = [
boost
openssl
mysql80
];
cmakeFlags = [
# libmysqlclient is shared library
"-DMYSQLCLIENT_STATIC_LINKING=false"
# still needed for mysql-workbench
"-DWITH_JDBC=true"
];
meta = {
homepage = https://dev.mysql.com/downloads/connector/cpp/;
homepage = "https://dev.mysql.com/downloads/connector/cpp/";
description = "C++ library for connecting to mysql servers.";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.unix;

View File

@ -12779,9 +12779,7 @@ in
libmysofa = callPackage ../development/libraries/audio/libmysofa { };
libmysqlconnectorcpp = callPackage ../development/libraries/libmysqlconnectorcpp {
mysql = mysql57;
};
libmysqlconnectorcpp = callPackage ../development/libraries/libmysqlconnectorcpp { };
libnatpmp = callPackage ../development/libraries/libnatpmp { };