2018-08-08 23:22:59 +01:00
|
|
|
|
{ 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
|
2010-09-28 10:33:56 +01:00
|
|
|
|
}:
|
|
|
|
|
|
2016-08-14 13:28:05 +01:00
|
|
|
|
let
|
2018-08-08 23:22:59 +01:00
|
|
|
|
inherit (python2.pkgs) paramiko pycairo pyodbc;
|
2016-08-14 13:28:05 +01:00
|
|
|
|
in stdenv.mkDerivation rec {
|
2010-10-26 01:22:44 +01:00
|
|
|
|
pname = "mysql-workbench";
|
2019-04-09 19:42:27 +01:00
|
|
|
|
version = "8.0.15";
|
2010-09-28 10:33:56 +01:00
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
2016-09-17 06:46:14 +01:00
|
|
|
|
url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz";
|
2019-04-09 19:42:27 +01:00
|
|
|
|
sha256 = "0ca93azasya5xiw6j2map8drmxf445qqydpvrb512kjfqdiv67x6";
|
2010-09-28 10:33:56 +01:00
|
|
|
|
};
|
|
|
|
|
|
2018-08-08 23:22:59 +01:00
|
|
|
|
patches = [
|
|
|
|
|
./fix-gdal-includes.patch
|
|
|
|
|
(substituteAll {
|
|
|
|
|
src = ./hardcode-paths.patch;
|
|
|
|
|
catchsegv = "${glibc.bin}/bin/catchsegv";
|
|
|
|
|
bash = "${bash}/bin/bash";
|
|
|
|
|
cp = "${coreutils}/bin/cp";
|
|
|
|
|
dd = "${coreutils}/bin/dd";
|
|
|
|
|
ls = "${coreutils}/bin/ls";
|
|
|
|
|
mkdir = "${coreutils}/bin/mkdir";
|
|
|
|
|
nohup = "${coreutils}/bin/nohup";
|
|
|
|
|
rm = "${coreutils}/bin/rm";
|
|
|
|
|
rmdir = "${coreutils}/bin/rmdir";
|
|
|
|
|
sudo = "${sudo}/bin/sudo";
|
|
|
|
|
})
|
|
|
|
|
];
|
2016-09-17 06:46:14 +01:00
|
|
|
|
|
2019-08-14 21:46:52 +01:00
|
|
|
|
# have it look for 4.7.2 instead of 4.7.1
|
|
|
|
|
preConfigure = ''
|
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
|
--replace "antlr-4.7.1-complete.jar" "antlr-4.7.2-complete.jar"
|
|
|
|
|
'';
|
|
|
|
|
|
2018-08-08 23:22:59 +01:00
|
|
|
|
nativeBuildInputs = [
|
|
|
|
|
cmake ninja pkgconfig jre swig wrapGAppsHook
|
|
|
|
|
];
|
2016-09-17 06:46:14 +01:00
|
|
|
|
|
2018-08-08 23:22:59 +01:00
|
|
|
|
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
|
|
|
|
|
# python dependencies:
|
|
|
|
|
paramiko pycairo pyodbc # sqlanydb
|
|
|
|
|
# transitive dependencies:
|
|
|
|
|
libpthreadstubs libXdmcp libxkbcommon epoxy at-spi2-core dbus
|
|
|
|
|
];
|
2010-09-28 10:33:56 +01:00
|
|
|
|
|
2018-08-08 23:22:59 +01:00
|
|
|
|
postPatch = ''
|
|
|
|
|
patchShebangs tools/get_wb_version.sh
|
2010-09-28 10:33:56 +01:00
|
|
|
|
'';
|
|
|
|
|
|
2016-09-17 06:46:14 +01:00
|
|
|
|
NIX_CFLAGS_COMPILE = [
|
2018-08-08 23:22:59 +01:00
|
|
|
|
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
|
|
|
|
|
"-Wno-error=deprecated-declarations"
|
2016-09-17 06:46:14 +01:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
|
"-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"
|
2018-08-08 23:22:59 +01:00
|
|
|
|
"-DIODBC_CONFIG_PATH=${libiodbc}/bin/iodbc-config"
|
|
|
|
|
"-DWITH_ANTLR_JAR=${antlr4_7.jarLocation}"
|
2016-09-17 06:46:14 +01:00
|
|
|
|
];
|
|
|
|
|
|
2018-08-08 23:22:59 +01:00
|
|
|
|
# There is already an executable and a wrapper in bindir
|
|
|
|
|
# No need to wrap both
|
|
|
|
|
dontWrapGApps = true;
|
2015-05-28 17:40:33 +01:00
|
|
|
|
|
2018-08-08 23:22:59 +01:00
|
|
|
|
preFixup = ''
|
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
|
--prefix PATH : "${python2}/bin"
|
|
|
|
|
--prefix PROJSO : "${proj}/lib/libproj.so"
|
|
|
|
|
--set PYTHONPATH $PYTHONPATH
|
|
|
|
|
)
|
|
|
|
|
'';
|
2010-09-28 10:33:56 +01:00
|
|
|
|
|
2018-08-08 23:22:59 +01:00
|
|
|
|
# Let’s wrap the programs not ending with bin
|
|
|
|
|
# until https://bugs.mysql.com/bug.php?id=91948 is fixed
|
|
|
|
|
postFixup = ''
|
|
|
|
|
find -L "$out/bin" -type f -executable -print0 \
|
|
|
|
|
| while IFS= read -r -d ''' file; do
|
|
|
|
|
if [[ "''${file}" != *-bin ]]; then
|
2019-09-22 08:38:09 +01:00
|
|
|
|
echo "Wrapping program $file"
|
|
|
|
|
wrapGApp "$file"
|
2018-08-08 23:22:59 +01:00
|
|
|
|
fi
|
|
|
|
|
done
|
2010-09-28 10:33:56 +01:00
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2013-10-06 10:49:53 +01:00
|
|
|
|
description = "Visual MySQL database modeling, administration and querying tool";
|
2010-09-28 10:33:56 +01:00
|
|
|
|
longDescription = ''
|
|
|
|
|
MySQL Workbench is a modeling tool that allows you to design
|
|
|
|
|
and generate MySQL databases graphically. It also has administration
|
|
|
|
|
and query development modules where you can manage MySQL server instances
|
|
|
|
|
and execute SQL queries.
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
homepage = http://wb.mysql.com/;
|
|
|
|
|
license = licenses.gpl2;
|
|
|
|
|
maintainers = [ maintainers.kkallio ];
|
2018-08-08 23:22:59 +01:00
|
|
|
|
platforms = platforms.linux;
|
2010-09-28 10:33:56 +01:00
|
|
|
|
};
|
|
|
|
|
}
|