lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 17.09-beta 131 lines 5.2 kB view raw
1{ stdenv, fetchurl, makeWrapper, cmake, pkgconfig 2, glibc, gnome_keyring, gtk, gtkmm, pcre, swig, sudo 3, mysql, libxml2, libctemplate, libmysqlconnectorcpp 4, vsqlite, tinyxml, gdal, libiodbc, libpthreadstubs 5, libXdmcp, libuuid, libzip, libgnome_keyring, file 6, pythonPackages, jre, autoconf, automake, libtool 7, boost, glibmm, libsigcxx, pangomm, libX11, openssl 8, proj, cairo, libglade 9}: 10 11let 12 inherit (pythonPackages) pexpect pycrypto python paramiko; 13in stdenv.mkDerivation rec { 14 pname = "mysql-workbench"; 15 version = "6.3.8"; 16 name = "${pname}-${version}"; 17 18 src = fetchurl { 19 url = "http://dev.mysql.com/get/Downloads/MySQLGUITools/mysql-workbench-community-${version}-src.tar.gz"; 20 sha256 = "1bxd828nrawmym6d8awh1vrni8dsbwh1k5am1lrq5ihp5c3kw9ka"; 21 }; 22 23 buildInputs = [ cmake pkgconfig glibc gnome_keyring gtk gtk.dev gtkmm pcre swig python sudo 24 paramiko mysql libxml2 libctemplate libmysqlconnectorcpp vsqlite tinyxml gdal libiodbc file 25 libpthreadstubs libXdmcp libuuid libzip libgnome_keyring libgnome_keyring.dev jre autoconf 26 automake libtool boost glibmm glibmm.dev libsigcxx pangomm libX11 pexpect pycrypto openssl 27 proj cairo cairo.dev makeWrapper libglade ] ; 28 29 prePatch = '' 30 for f in backend/wbpublic/{grt/spatial_handler.h,grtui/geom_draw_box.h,objimpl/db.query/db_query_Resultset.cpp} ; 31 do 32 sed -i 's@#include <gdal/@#include <@' $f ; 33 done 34 35 sed -i '32s@mysqlparser@mysqlparser sqlparser@' library/mysql.parser/CMakeLists.txt 36 37 cat <<EOF > ext/antlr-runtime/fix-configure 38 #!${stdenv.shell} 39 echo "fixing bundled antlr3c configure" ; 40 sed -i 's@/usr/bin/file@${file}/bin/file@' configure 41 sed -i '12121d' configure 42 EOF 43 chmod +x ext/antlr-runtime/fix-configure 44 sed -i '236s@&&@& ''${PROJECT_SOURCE_DIR}/ext/antlr-runtime/fix-configure &@' CMakeLists.txt 45 46 substituteInPlace $(pwd)/frontend/linux/workbench/mysql-workbench.in --replace "catchsegv" "${glibc.bin}/bin/catchsegv" 47 substituteInPlace $(pwd)/frontend/linux/workbench/mysql-workbench.in --replace "/usr/lib/x86_64-linux-gnu" "${proj}/lib" 48 patchShebangs $(pwd)/library/mysql.parser/grammar/build-parser 49 patchShebangs $(pwd)/tools/get_wb_version.sh 50 ''; 51 52 NIX_CFLAGS_COMPILE = [ 53 "-I${libsigcxx}/lib/sigc++-2.0/include" 54 "-I${pangomm}/lib/pangomm-1.4/include" 55 "-I${glibmm}/lib/giomm-2.4/include" 56 ]; 57 58 cmakeFlags = [ 59 "-DCMAKE_CXX_FLAGS=-std=c++11" 60 "-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config" 61 "-DCTemplate_INCLUDE_DIR=${libctemplate}/include" 62 "-DCAIRO_INCLUDE_DIRS=${cairo.dev}/include" 63 "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk}/lib/gtk-2.0/include" 64 "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${gtk.dev}/include" 65 "-DGTK2_GTKMMCONFIG_INCLUDE_DIR=${gtkmm}/lib/gtkmm-2.4/include" 66 "-DGTK2_GDKMMCONFIG_INCLUDE_DIR=${gtkmm}/lib/gdkmm-2.4/include" 67 "-DGTK2_GLIBMMCONFIG_INCLUDE_DIR=${glibmm}/lib/glibmm-2.4/include" 68 ]; 69 70 postInstall = '' 71 patchShebangs $out/share/mysql-workbench/extras/build_freetds.sh 72 73 for i in $out/lib/mysql-workbench/modules/wb_utils_grt.py \ 74 $out/lib/mysql-workbench/modules/wb_server_management.py \ 75 $out/lib/mysql-workbench/modules/wb_admin_grt.py; do 76 substituteInPlace $i \ 77 --replace "/bin/bash" ${stdenv.shell} \ 78 --replace "/usr/bin/sudo" ${sudo}/bin/sudo 79 done 80 81 wrapProgram "$out/bin/mysql-workbench" \ 82 --prefix LD_LIBRARY_PATH : "${python}/lib" \ 83 --prefix LD_LIBRARY_PATH : "$(cat ${stdenv.cc}/nix-support/orig-cc)/lib64" \ 84 --prefix PATH : "${gnome_keyring}/bin" \ 85 --prefix PATH : "${python}/bin" \ 86 --set PYTHONPATH $PYTHONPATH \ 87 --run ' 88# The gnome-keyring-daemon must be running. To allow for environments like 89# kde, xfce where this is not so, we start it first. 90# It is cleaned up using a supervisor subshell which detects that 91# the parent has finished via the closed pipe as terminate signal idiom, 92# used because we cannot clean up after ourselves due to the exec call. 93 94# Start gnome-keyring-daemon, export the environment variables it asks us to set. 95for expr in $( gnome-keyring-daemon --start ) ; do eval "export "$expr ; done 96 97# Prepare fifo pipe. 98FIFOCTL="/tmp/gnome-keyring-daemon-ctl.$$.fifo" 99[ -p $FIFOCTL ] && rm $FIFOCTL 100mkfifo $FIFOCTL 101 102# Supervisor subshell waits reading from pipe, will receive EOF when parent 103# closes pipe on termination. Negate read with ! operator to avoid subshell 104# quitting when read EOF returns 1 due to -e option being set. 105( 106 exec 19< $FIFOCTL 107 ! read -u 19 108 109 kill $GNOME_KEYRING_PID 110 rm $FIFOCTL 111) & 112 113exec 19> $FIFOCTL 114 ' 115 ''; 116 117 meta = with stdenv.lib; { 118 description = "Visual MySQL database modeling, administration and querying tool"; 119 longDescription = '' 120 MySQL Workbench is a modeling tool that allows you to design 121 and generate MySQL databases graphically. It also has administration 122 and query development modules where you can manage MySQL server instances 123 and execute SQL queries. 124 ''; 125 126 homepage = http://wb.mysql.com/; 127 license = licenses.gpl2; 128 maintainers = [ maintainers.kkallio ]; 129 platforms = [ "x86_64-linux" ]; 130 }; 131}