at 23.11-beta 55 lines 1.7 kB view raw
1{ mkDerivation, lib, fetchFromGitHub, cmake, extra-cmake-modules, makeWrapper 2, boost, doxygen, openssl, libmysqlclient, postgresql, graphviz, loki 3, qscintilla, qtbase, qttools }: 4 5mkDerivation { 6 pname = "tora"; 7 version = "3.2.176"; 8 9 src = fetchFromGitHub { 10 owner = "tora-tool"; 11 repo = "tora"; 12 rev = "39bf2837779bf458fc72a9f0e49271152e57829f"; 13 sha256 = "0fr9b542i8r6shgnz33lc3cz333fnxgmac033yxfrdjfglzk0j2k"; 14 }; 15 16 nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper qttools ]; 17 18 buildInputs = [ 19 boost doxygen graphviz loki libmysqlclient openssl postgresql qscintilla qtbase 20 ]; 21 22 preConfigure = '' 23 substituteInPlace src/widgets/toglobalsetting.cpp \ 24 --replace 'defaultGvHome = "/usr/bin"' 'defaultGvHome = "${lib.getBin graphviz}/bin"' 25 substituteInPlace extlibs/libermodel/dotgraph.cpp \ 26 --replace /usr/bin/dot ${lib.getBin graphviz}/bin/dot 27 ''; 28 29 cmakeFlags = [ 30 "-DWANT_INTERNAL_LOKI=0" 31 "-DWANT_INTERNAL_QSCINTILLA=0" 32 # cmake/modules/FindQScintilla.cmake looks in qtbase and for the wrong library name 33 "-DQSCINTILLA_INCLUDE_DIR=${qscintilla}/include" 34 "-DQSCINTILLA_LIBRARY=${qscintilla}/lib/libqscintilla2.so" 35 "-DENABLE_DB2=0" 36 "-DENABLE_ORACLE=0" 37 "-DENABLE_TERADATA=0" 38 "-DQT5_BUILD=1" 39 "-Wno-dev" 40 ]; 41 42 # these libraries are only searched for at runtime so we need to force-link them 43 NIX_LDFLAGS = "-lgvc -lmysqlclient -lecpg -lssl -L${libmysqlclient}/lib/mariadb"; 44 45 qtWrapperArgs = [ 46 ''--prefix PATH : ${lib.getBin graphviz}/bin'' 47 ]; 48 49 meta = with lib; { 50 description = "Tora SQL tool"; 51 maintainers = with maintainers; [ peterhoeg ]; 52 platforms = platforms.linux; 53 license = licenses.asl20; 54 }; 55}