1 { mkDerivation, lib, fetchFromGitHub, cmake, extra-cmake-modules, makeWrapper
2 , boost, doxygen, openssl, libmysqlclient, postgresql, graphviz, loki
3 , qscintilla, qtbase, qttools }:
9 src = fetchFromGitHub {
12 rev = "39bf2837779bf458fc72a9f0e49271152e57829f";
13 sha256 = "0fr9b542i8r6shgnz33lc3cz333fnxgmac033yxfrdjfglzk0j2k";
16 nativeBuildInputs = [ cmake extra-cmake-modules makeWrapper qttools ];
19 boost doxygen graphviz loki libmysqlclient openssl postgresql qscintilla qtbase
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
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"
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";
46 ''--prefix PATH : ${lib.getBin graphviz}/bin''
50 description = "Tora SQL tool";
52 maintainers = with maintainers; [ peterhoeg ];
53 platforms = platforms.linux;
54 license = licenses.asl20;